Browse Source

Jenkinsfile dev

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

+ 4 - 4
Jenkinsfile

@@ -5,7 +5,7 @@ pipeline {
   environment {
     docker_registry='dev-registry.infoclinica.ru:5000'
     docker_image='node'
-    swarm_git_url='ssh://git@git.sdsys.ru:8022/iru/stack-deploy.git'
+    SWARM_GIT_URL='ssh://git@git.sdsys.ru:8022/iru/stack-deploy.git'
   }
   parameters {
     string(
@@ -64,9 +64,9 @@ pipeline {
 //        sh '''docker tag ${docker_registry}/${docker_image}:${repo}-${BUILD_NUMBER} ${docker_registry}/${docker_image}:latest
 //              docker pull ${docker_registry}/${docker_image}:latest'''
         echo "Updating tag info in iru/stack-deploy repository"
-        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 ${swarm_git_url}
+        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 ${SWARM_GIT_URL}
                 ls'''
         }
       }