added script for copying backendfolder to olberry
All checks were successful
SimcoDash/simcompanies-dashboard/pipeline/head This commit looks good
All checks were successful
SimcoDash/simcompanies-dashboard/pipeline/head This commit looks good
This commit is contained in:
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@@ -17,9 +17,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy Backend') {
|
stage('Deploy Backend') {
|
||||||
environment {
|
|
||||||
AN_ACCESS_KEY = credentials('3885a64d-7d43-42c2-a713-c8600b44842f')
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
script{
|
script{
|
||||||
def SCRIPT_OUTPUT2 = sh (script: 'sudo bash ./jenkins/deployBackend.sh ${BRANCH_NAME}',returnStdout: true)
|
def SCRIPT_OUTPUT2 = sh (script: 'sudo bash ./jenkins/deployBackend.sh ${BRANCH_NAME}',returnStdout: true)
|
||||||
|
|||||||
@@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
if test "$1" = "edit-jenkinsfile"
|
if test "$1" = "edit-jenkinsfile"
|
||||||
then
|
then
|
||||||
|
echo 'Stop node process'
|
||||||
|
ssh -i /etc/ssh/simco_key simco-jenkins@gitea.oliver.boehlk.io "killall node"
|
||||||
|
echo 'Remove old backend folder'
|
||||||
|
ssh -i /etc/ssh/simco_key simco-jenkins@gitea.oliver.boehlk.io "rm -r ~/simco-dashboard/backend"
|
||||||
echo 'Copy backend to OlberryPi'
|
echo 'Copy backend to OlberryPi'
|
||||||
scp -r /backend/. simco-jenkins@gitea.oliver.boehlk.io:~/simco-dashboard/backend
|
scp -i /etc/ssh/simco_key -r backend simco-jenkins@gitea.oliver.boehlk.io:~/simco-dashboard
|
||||||
else
|
else
|
||||||
echo "Skipping for non-master branch"
|
echo "Skipping for non-master branch"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user