From 7a03fc0b1ee8fcfcf02b60979202ef81a43f6e66 Mon Sep 17 00:00:00 2001 From: Oleksandr Butenko <58562385+sprientera992@users.noreply.github.com> Date: Sun, 13 Jun 2021 16:57:48 +0300 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3be9bc76d..7fb1eeb2f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' }