Merge branch 'RED-7784-fix' into 'master'
RED-7784 - Remove retag mechanism Closes RED-7784 See merge request redactmanager/redaction-report-service!25
This commit is contained in:
commit
caedd62c58
@ -68,7 +68,7 @@ tasks.named<BootBuildImage>("bootBuildImage") {
|
||||
)
|
||||
)
|
||||
|
||||
imageName.set("nexus.knecon.com:5001/red/${project.name}:cache") // must build image with same name always, otherwise the builder will not know which image to use as cache. DO NOT CHANGE!
|
||||
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
|
||||
|
||||
if (project.hasProperty("buildbootDockerHostNetwork")) {
|
||||
network.set("host")
|
||||
@ -86,20 +86,5 @@ tasks.named<BootBuildImage>("bootBuildImage") {
|
||||
email.set(providers.gradleProperty("mavenEmail").getOrNull())
|
||||
url.set("https://nexus.knecon.com:5001/")
|
||||
}
|
||||
|
||||
doLast {
|
||||
// after the build has been finished, retag the created image with the correct version and push to registry
|
||||
val dockerTag = "nexus.knecon.com:5001/red/${project.name}:${project.version}"
|
||||
println("Tagging image as $dockerTag")
|
||||
project.exec {
|
||||
commandLine("docker", "tag", imageName.get(), dockerTag)
|
||||
}
|
||||
if (publish.get()) {
|
||||
println("Publishing $dockerTag")
|
||||
project.exec {
|
||||
commandLine("docker", "push", dockerTag)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user