Skip to content

Commit

Permalink
Merge pull request #68 from workshopapps/feat/devOps-jenkins-pipeline
Browse files Browse the repository at this point in the history
Added jenkins CICD pipeline
  • Loading branch information
jahswilling authored Dec 1, 2022
2 parents 69521b6 + 023d50f commit 880773c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pipeline {
agent any

stages {

stage("Build Backend"){

steps {
sh " rm -rf pictureminer.api"
sh "git clone https://github.com/workshopapps/pictureminer.api.git"
dir('pictureminer.api') {
sh "go build"
}
}
}
stage("Deploy Backend"){

steps {
sh "sudo su - javi && whoami"

sh "sudo cp -fr ${WORKSPACE}/pictureminer.api/* /home/javi/backend/"
sh "sudo systemctl restart discripto_api.service"
}
}

}
}

0 comments on commit 880773c

Please sign in to comment.