Владимир Томишинец il y a 5 ans
Parent
commit
afc151b269
1 fichiers modifiés avec 7 ajouts et 4 suppressions
  1. 7 4
      jenkinsfile.get.and.sync.dict

+ 7 - 4
jenkinsfile.get.and.sync.dict

@@ -76,11 +76,14 @@ pipeline {
     stages {
         stage ("Git pull stack-deploy REPO") {
             steps {
-                withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
-                    sh '''GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
+                script {
+                    withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
+                        sh '''GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
                             git clone ${STACK_DEPLOY_REPO}
-                       '''
-                TAG = sh (script: "cat ${WORKSPACE}/stack-deploy/tags/analis-wineservice.stable-version" , returnStdout: true).split('\n')
+                        '''
+                    }
+                    TAG = sh (script:  "cat ${WORKSPACE}/stack-deploy/tags/analis-wineservice.stable-version" , returnStdout: true).split('\n')
+                }
             }
         }
 /*        stage ("HELIX dictionaries") {