Browse Source

Обновить 'Jenkinsfile'

Vadim Surkov 6 years ago
parent
commit
a731d4cee5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Jenkinsfile

+ 2 - 2
Jenkinsfile

@@ -73,10 +73,10 @@ pipeline {
           for (String item : service_update.split()) {
             try{
               echo "Updating $item, cluster $CLUSTER_TGT"
-              withEnv(["service_name=${item}","clustername=${CLUSTER_TGT}"]) {
+              withEnv(["service_name=${item}","clustername=${CLUSTER_TGT}","imagetag=${NEWTAG}"]) {
                   sh '''export DOCKER_CERT_PATH=/run/secrets/swarm
                         export DOCKER_HOST=tcp://${clustername}:2376 DOCKER_TLS_VERIFY=1
-                        docker service update ${service_name} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${NEWTAG}
+                        docker service update ${service_name} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${imagetag}
                       '''
                 }
             }