From f7a3fa961503981d9c7bafc8b512e6a17523d093 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Tue, 2 Apr 2024 13:29:22 -0400 Subject: [PATCH] more loop removal, stop updating existing tags Signed-off-by: Justin Florentine --- build.gradle | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index b79124dc0a2..b63be38d1ef 100644 --- a/build.gradle +++ b/build.gradle @@ -850,34 +850,23 @@ task dockerUploadRelease { task manifestDocker { def image = "${dockerImageName}:${dockerBuildVersion}" - def archs = ["arm64", "amd64"] - def tags = ["${image}"] - - if (project.hasProperty('branch') && project.property('branch') == 'main') { - tags.add("${dockerImageName}:develop") - } - - if (!isInterimBuild(dockerBuildVersion)) { - tags.add("${dockerImageName}:" + dockerBuildVersion.split(/\./)[0..1].join('.')) - } + def archs = ["arm64", "amd64"] //TODO: this assumes dockerUpload task has already been run on 2 different archs! doLast { - for (baseTag in tags) { exec { - targets = "" - archs.forEach { arch -> targets += "'${baseTag}-${arch}' " } - def cmd = "docker manifest create '${baseTag}' ${targets}" + def targets = "" + archs.forEach { arch -> targets += "'${image}-${arch}' " } + def cmd = "docker manifest create '${image}' ${targets}" println "Executing '${cmd}'" executable shell args "-c", cmd } exec { - def cmd = "docker manifest push '${baseTag}'" + def cmd = "docker manifest push '${image}'" println "Executing '${cmd}'" executable shell args "-c", cmd } - } } }