Skip to content

Commit

Permalink
Fixed Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
manjurulhoque committed Jul 24, 2023
1 parent 65fca9b commit e15fc0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions deployment/jenkins_deploy_prod_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

ssh root@159.69.172.93 <<EOF
cd projects/django/job-portal/
git pull
docker-compose -f docker-compose.prod.yml up --build -d
sudo systemctl restart gunicorn
exit
EOF

0 comments on commit e15fc0a

Please sign in to comment.