|
@@ -79,7 +79,7 @@ pipeline {
|
|
steps {
|
|
steps {
|
|
echo "Updating tag info in ${SWARM_GIT_NAME} repository"
|
|
echo "Updating tag info in ${SWARM_GIT_NAME} repository"
|
|
withCredentials([sshUserPrivateKey(credentialsId: 'provision', keyFileVariable: 'GIT_SSH_KEY', passphraseVariable: '', usernameVariable: 'GIT_SSH_USERNAME')]) {
|
|
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' \
|
|
|
|
|
|
+ sh """GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
|
git clone ${SWARM_GIT_URL} && cd ${SWARM_GIT_NAME}
|
|
git clone ${SWARM_GIT_URL} && cd ${SWARM_GIT_NAME}
|
|
if [ $(git branch --list -a | grep -q ${branch}; echo $?) == 0 ];then echo "${branch} is already exist";git checkout ${branch}; \
|
|
if [ $(git branch --list -a | grep -q ${branch}; echo $?) == 0 ];then echo "${branch} is already exist";git checkout ${branch}; \
|
|
else echo "${branch} does not exist!!!"; git checkout -b ${branch};fi
|
|
else echo "${branch} does not exist!!!"; git checkout -b ${branch};fi
|
|
@@ -90,7 +90,7 @@ pipeline {
|
|
git commit -m 'Version update'
|
|
git commit -m 'Version update'
|
|
GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
|
GIT_SSH_COMMAND='ssh -i ${GIT_SSH_KEY} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
|
git push origin ${branch}
|
|
git push origin ${branch}
|
|
- '''
|
|
|
|
|
|
+ """
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|