Bug 1501 - Correct tag for push 25/10625/2
authorbeierlm <mark.beierl@canonical.com>
Tue, 13 Apr 2021 16:18:37 +0000 (12:18 -0400)
committerbeierlm <mark.beierl@canonical.com>
Tue, 13 Apr 2021 17:58:41 +0000 (13:58 -0400)
Change to use the tag of the current build to promote to the
final dockertag that is pushed to Dockerhub

Fixes bug 1501

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

index 6368381..954c692 100644 (file)
@@ -557,11 +557,13 @@ EOF"""
                             for (buildStep in containerList) {
                                 def module = buildStep
                                 def moduleName = buildStep.toLowerCase()
-                                def moduleTag = params.DOCKER_TAG
+                                def dockerTag = params.DOCKER_TAG
+                                def moduleTag = container_name
+
                                 parallelSteps[module] = {
                                     dir("$module") {
-                                        sh "docker tag opensourcemano/${moduleName}:${moduleTag} opensourcemano/${moduleName}:${moduleTag}"
-                                        sh "docker push opensourcemano/${moduleName}:${moduleTag}"
+                                        sh "docker tag opensourcemano/${moduleName}:${moduleTag} opensourcemano/${moduleName}:${dockerTag}"
+                                        sh "docker push opensourcemano/${moduleName}:${dockerTag}"
                                     }
                                 }
                             }