From eb0b30ea6f657b057c6e837ea7c1e4e3842569dd Mon Sep 17 00:00:00 2001 From: Jahswill Ovedhe Date: Thu, 1 Dec 2022 18:06:22 +0100 Subject: [PATCH 1/2] testing the pipeline --- Jenkinsfile | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 08c2804..1b20b11 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,27 +1,3 @@ -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 +// testing auto deploy \ No newline at end of file From fb2d5b0b486a4792449ceabf59ea5d8259250728 Mon Sep 17 00:00:00 2001 From: Jahswill Ovedhe Date: Thu, 1 Dec 2022 18:14:55 +0100 Subject: [PATCH 2/2] testing the pipeline --- Jenkinsfile | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1b20b11..08c2804 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,27 @@ +pipeline { + agent any + + stages { + stage("Build Backend"){ -// testing auto deploy \ No newline at end of file + 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