Vadim Surkov 7 years ago
parent
commit
ba3d27adde
1 changed files with 9 additions and 1 deletions
  1. 9 1
      Jenkinsfile

+ 9 - 1
Jenkinsfile

@@ -29,7 +29,15 @@ pipeline {
       when { expression { build == "true" } }
       steps {
         echo "Building with repo $repo"
-        sh "echo docker build -t ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER} ${WORKSPACE}"
+        sh "echo docker build --build-arg repo=${repo} --no-cache -t ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER} ."
+      }
+    }
+    stage("Publish") {
+      when { expression { build == "true" } }
+      steps {
+        echo "Building with repo $repo"
+        sh "docker build --build-arg repo=${repo} --no-cache -t ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER} ."
+        sh "false"
       }
     }
     stage("Update") {