diff --git a/build.gradle b/build.gradle index dccd40edd7..54a87bc505 100644 --- a/build.gradle +++ b/build.gradle @@ -751,6 +751,7 @@ task dockerUpload { def archVariantImage = "${variantImage}-${architecture}" def cmd = "docker tag '${variantImage}' '${archVariantImage}' && docker push '${archVariantImage}'" additionalTags.each { tag -> cmd += " && docker tag '${variantImage}' '${dockerImageName}:${tag.trim()}-${variant}-${architecture}' && docker push '${dockerImageName}:${tag.trim()}-${variant}-${architecture}'" } + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -760,6 +761,7 @@ task dockerUpload { def archImage = "${image}-${architecture}" def cmd = "docker tag ${image} ${archImage} && docker push '${archImage}'" additionalTags.each { tag -> cmd += " && docker tag '${image}' '${dockerImageName}:${tag.trim()}-${architecture}' && docker push '${dockerImageName}:${tag.trim()}-${architecture}'" } + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -775,7 +777,14 @@ task dockerUploadRelease { for (def variant in dockerVariants) { def variantImage = "${image}-${variant}" exec { - def cmd = "docker pull '${variantImage}-${architecture}' && docker tag '${variantImage}-${architecture}' '${dockerImageName}:latest-${variant}-${architecture}' && docker push '${dockerImageName}:latest-${variant}-${architecture}'" + def cmd = "docker pull '${variantImage}-${architecture}' && docker tag '${variantImage}-${architecture}' '${dockerImageName}:latest-${variant}-${architecture}'" + println "Executing '${cmd}'" + executable "sh" + args "-c", cmd + } + exec { + def cmd = "docker push '${dockerImageName}:latest-${variant}-${architecture}'" + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -783,7 +792,14 @@ task dockerUploadRelease { exec { def archImage = "${image}-${architecture}" - def cmd = "docker pull '${archImage}' && docker tag ${archImage} '${dockerImageName}:latest-${architecture}' && docker push '${dockerImageName}:latest-${architecture}'" + def cmd = "docker pull '${archImage}' && docker tag ${archImage} '${dockerImageName}:latest-${architecture}'" + println "Executing '${cmd}'" + executable "sh" + args "-c", cmd + } + exec { + def cmd = "docker push '${dockerImageName}:latest-${architecture}'" + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -812,7 +828,14 @@ task manifestDocker { archs.forEach { arch -> targets += "'${variantImage}-${arch}' " } exec { - def cmd = "docker manifest create '${variantImage}' ${targets} && docker manifest push '${variantImage}'" + def cmd = "docker manifest create '${variantImage}' ${targets}" + println "Executing '${cmd}'" + executable "sh" + args "-c", cmd + } + exec { + def cmd = "docker manifest push '${variantImage}'" + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -821,7 +844,14 @@ task manifestDocker { exec { def targets = "" archs.forEach { arch -> targets += "'${baseTag}-${arch}' " } - def cmd = "docker manifest create '${baseTag}' ${targets} && docker manifest push '${baseTag}'" + def cmd = "docker manifest create '${baseTag}' ${targets}" + println "Executing '${cmd}'" + executable "sh" + args "-c", cmd + } + exec { + def cmd = "docker manifest push '${baseTag}'" + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -840,7 +870,14 @@ task manifestDockerRelease { archs.forEach { arch -> targets += "'${variantImage}-${arch}' " } exec { - def cmd = "docker manifest create '${variantImage}' ${targets} && docker manifest push '${variantImage}'" + def cmd = "docker manifest create '${variantImage}' ${targets}" + println "Executing '${cmd}'" + executable "sh" + args "-c", cmd + } + exec { + def cmd = "docker manifest push '${variantImage}'" + println "Executing '${cmd}'" executable "sh" args "-c", cmd } @@ -849,7 +886,14 @@ task manifestDockerRelease { exec { def targets = "" archs.forEach { arch -> targets += "'${baseTag}-${arch}' " } - def cmd = "docker manifest create '${baseTag}' ${targets} && docker manifest push '${baseTag}'" + def cmd = "docker manifest create '${baseTag}' ${targets}" + println "Executing '${cmd}'" + executable "sh" + args "-c", cmd + } + exec { + def cmd = "docker manifest push '${baseTag}'" + println "Executing '${cmd}'" executable "sh" args "-c", cmd }