Browse Source

New image tagging work in progress

Vadim Surkov 6 years ago
parent
commit
87b2c1ae5c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Jenkinsfile

+ 4 - 1
Jenkinsfile

@@ -39,7 +39,10 @@ pipeline {
       steps {
         echo "Building ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}."
         sh "docker build --build-arg repo=${repo} --no-cache -t ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} ."
-        NEWTAG = sh script: "docker run --rm ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} rpm -q --qf %{VERSION}-%{RELEASE} web-registry-admin 2> /dev/null", returnStdout: true
+        script {
+           NEWTAG = sh script: "docker run --rm ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} rpm -q --qf %{VERSION}-%{RELEASE} web-registry-admin 2> /dev/null", returnStdout: true
+           echo "NEWTAG is $NEWTAG"
+        }
       }
     }
     stage("Publish") {