diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..08c2804 --- /dev/null +++ b/Jenkinsfile @@ -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" + } + } + + } +} \ No newline at end of file