|
@@ -5,6 +5,8 @@ pipeline {
|
|
|
environment {
|
|
|
docker_registry='dev-registry.infoclinica.ru:5000'
|
|
|
docker_image='node'
|
|
|
+ jenkins_ssh_key='/run/secrets/provision-ssh-key'
|
|
|
+
|
|
|
}
|
|
|
parameters {
|
|
|
string(
|
|
@@ -54,6 +56,18 @@ pipeline {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ stage("Tagging"){
|
|
|
+ steps{
|
|
|
+ echo "Setting latest tag"
|
|
|
+ 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}'''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
post {
|
|
|
always {
|