From b2efac6c25aebf4ca10ec0670da036c7e1c8e0ed Mon Sep 17 00:00:00 2001 From: CIzz22 Date: Wed, 15 Jan 2025 08:12:48 +0000 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3fb7975..2a18ee8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -62,21 +62,21 @@ pipeline { } } - // stage('Deploy') { - // steps { - // script { - // sshagent(credentials: [SSH_CREDENTIALS]) { - // sh """ - // ssh -o StrictHostKeyChecking=no ${SSH_CREDENTIALS_USR}@${SSH_SERVER_IP} ' - // cd ~/digital-twin/Docker - // sudo docker compose pull ${SERVICE_NAME} - // sudo docker compose up -d ${SERVICE_NAME} - // ' - // """ - // } - // } - // } - // } + stage('Deploy') { + steps { + script { + sshagent(credentials: ['backend-server-digitaltwin']) { + sh """ + ssh -o StrictHostKeyChecking=no -p 12558 aimo@0.tcp.ap.ngrok.io ' + cd ~/digital-twin/Docker + sudo docker compose pull ${SERVICE_NAME} + sudo docker compose up -d ${SERVICE_NAME} + ' + """ + } + } + } + } } post {