Fix for multi-arch docker develop and latest tags (#3816)

* fix and test docker manifest step for develop and latest tags

Signed-off-by: garyschulte <garyschulte@gmail.com>
pull/3820/head
garyschulte 3 years ago committed by GitHub
parent 386945984a
commit d3c7268eda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      build.gradle

@ -780,19 +780,19 @@ task manifestDocker {
def image = "${dockerImage}:${dockerBuildVersion}" def image = "${dockerImage}:${dockerBuildVersion}"
def archs = ["arm64", "amd64"] def archs = ["arm64", "amd64"]
def tags = ["${image}"] def tags = ["${image}"]
if (project.hasProperty('branch') && project.property('branch') == 'main') { if (project.hasProperty('branch') && project.property('branch') == 'main') {
tags.add("${dockerImage}-develop") tags.add("${dockerImage}:develop")
} }
if (!(dockerBuildVersion ==~ /.*-SNAPSHOT/)) { if (!(dockerBuildVersion ==~ /.*-SNAPSHOT/)) {
tags.add('${dockerImage}-latest') tags.add('${dockerImage}:latest')
tags.add('${dockerImage}-' + dockerBuildVersion.split(/\./)[0..1].join('.')) tags.add('${dockerImage}:' + dockerBuildVersion.split(/\./)[0..1].join('.'))
} }
doLast { doLast {
for (baseTag in tags) { for (baseTag in tags) {
for (def variant in dockerVariants) { for (def variant in dockerVariants) {
// Just do variant images for now, later add tags and such
def variantImage = "${baseTag}-${variant}" def variantImage = "${baseTag}-${variant}"
def targets = "" def targets = ""
archs.forEach { arch -> targets += "'${variantImage}-${arch}' " } archs.forEach { arch -> targets += "'${variantImage}-${arch}' " }

Loading…
Cancel
Save