Browse Source

Code optimization

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

+ 4 - 6
Jenkinsfile

@@ -73,12 +73,10 @@ pipeline {
           for (String item : service_update.split()) {
             try{
               echo "Updating $item, cluster $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}:${imagetag}
-                      '''
-                }
+              sh """export DOCKER_CERT_PATH=/run/secrets/swarm
+                    export DOCKER_HOST=tcp://${CLUSTER_TGT}:2376 DOCKER_TLS_VERIFY=1
+                    docker service update ${item} --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${NEWTAG}
+                 """
             }
             catch(err){
               echo "Recovering service $item"