Fix Docker Push 17/11717/1
authorMark Beierl <mark.beierl@canonical.com>
Thu, 3 Mar 2022 14:20:19 +0000 (09:20 -0500)
committerMark Beierl <mark.beierl@canonical.com>
Thu, 3 Mar 2022 14:20:19 +0000 (09:20 -0500)
The variables for module, moduleName, etc are not being created in local
scope, causing the final docker push to re-use the last set value for
the modules.

Change-Id: I635955e5edcc2d94a50cec7749ac87813b5ac6c7
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
jenkins/ci-pipelines/ci_stage_3.groovy

index e8e6d25..61e9fd8 100644 (file)
@@ -605,10 +605,10 @@ EOF"""
                         stage('Publish to Dockerhub') {
                             parallelSteps = [:]
                             for (buildStep in containerList) {
-                                module = buildStep
-                                moduleName = buildStep.toLowerCase()
-                                dockerTag = params.DOCKER_TAG
-                                moduleTag = containerName
+                                def module = buildStep
+                                def moduleName = buildStep.toLowerCase()
+                                def dockerTag = params.DOCKER_TAG
+                                def moduleTag = containerName
 
                                 parallelSteps[module] = {
                                     dir("$module") {