mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 01:15:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
187d3bd351
commit
7a03fc0b1e
1 changed files with 2 additions and 5 deletions
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
|
@ -39,9 +39,6 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
stage ('DeployToProduction') {
|
||||
when {
|
||||
branch 'main'
|
||||
|
@ -53,8 +50,8 @@ pipeline {
|
|||
script {
|
||||
sh "sshpass -p '$USERPASS' -v ssh -o StrictHostKeyChecking=no $USERNAME@${env.prod_ip} \"docker pull sprientera/pet:${env.BUILD_NUMBER}\""
|
||||
try {
|
||||
sh "sshpass -p '$USERPASS' -v ssh -o StrictHostKeyChecking=no $USERNAME@${env.server_api \"docker stop pet\""
|
||||
sh "sshpass -p '$USERPASS' -v ssh -o StrictHostKeyChecking=no $USERNAME@${env.server_api \"docker rm pet\""
|
||||
sh "sshpass -p '$USERPASS' -v ssh -o StrictHostKeyChecking=no $USERNAME@${env.server_api \"docker stop pet\""
|
||||
sh "sshpass -p '$USERPASS' -v ssh -o StrictHostKeyChecking=no $USERNAME@${env.server_api \"docker rm pet\""
|
||||
} catch (err) {
|
||||
echo: 'caught error: $err'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue