Преглед на файлове

Обновить 'Jenkinsfile'

Vladimir Tomishinets преди 6 години
родител
ревизия
6b2977f5f6
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      Jenkinsfile

+ 4 - 4
Jenkinsfile

@@ -48,12 +48,12 @@ pipeline {
           for (String item : service_update.split()) {
             try{
               echo "Updating $item"
-              if (repo = "prod") {
+              if (repo == 'prod') {
               sh "export DOCKER_CERT_PATH=/run/secrets/swarm
                   export DOCKER_HOST=tcp://${CLUSTER_PROD}:2376 DOCKER_TLS_VERIFY=1
                   docker service update $item --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}"
               }
-              if (repo = "dev") {
+              if (repo == 'dev') {
               sh "export DOCKER_CERT_PATH=/run/secrets/swarm
                   export DOCKER_HOST=tcp://${CLUSTER_DEV}:2376 DOCKER_TLS_VERIFY=1
                   docker service update $item --image ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}"
@@ -61,12 +61,12 @@ pipeline {
             }
             catch(err){
               echo "Recovering service $item"
-              if (repo = "prod") {
+              if (repo == 'prod') {
               sh "export DOCKER_CERT_PATH=/run/secrets/swarm
                   export DOCKER_HOST=tcp://${CLUSTER_PROD}:2376 DOCKER_TLS_VERIFY=1
                   docker service rollback $item"
               }
-              if (repo = "dev") {
+              if (repo == 'dev') {
               sh "export DOCKER_CERT_PATH=/run/secrets/swarm
                   export DOCKER_HOST=tcp://${CLUSTER_DEV}:2376 DOCKER_TLS_VERIFY=1
                   docker service rollback $item"