From e15fc0a47775a9024a63cbf6b1ce841d2fe86c8b Mon Sep 17 00:00:00 2001 From: Manjurul Hoque Rumi Date: Mon, 24 Jul 2023 13:31:19 +0600 Subject: [PATCH] Fixed Jenkinsfile --- Jenkinsfile | 5 +---- deployment/jenkins_deploy_prod_docker.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 deployment/jenkins_deploy_prod_docker.sh diff --git a/Jenkinsfile b/Jenkinsfile index 72a7684..801d667 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,12 +61,9 @@ node { def lastChanges = readFile('GIT_CHANGES') //slackSend color: "warning", message: "Started `${env.JOB_NAME}#${env.BUILD_NUMBER}`\n\n_The changes:_\n${lastChanges}" - stage 'PWD' - sh 'pwd' - stage 'Deploy' // sh 'cd projects/django/job-portal/' - sh 'docker-compose -f docker-compose.prod.yml up --build -d' + sh './deployment/jenkins_deploy_prod_docker.sh' stage 'Publish results' echo "Deployment successful" diff --git a/deployment/jenkins_deploy_prod_docker.sh b/deployment/jenkins_deploy_prod_docker.sh new file mode 100755 index 0000000..0b72f94 --- /dev/null +++ b/deployment/jenkins_deploy_prod_docker.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +ssh root@159.69.172.93 <