Deploy the server on prod

This commit is contained in:
Marks Polakovs 2020-03-31 20:43:38 +02:00
parent 7668a7d781
commit 709c6b6e82

29
Jenkinsfile vendored
View file

@ -25,15 +25,26 @@ pipeline {
when { when {
branch 'production' branch 'production'
} }
environment { parallel {
REACT_APP_MYRADIO_NONAPI_BASE = 'https://ury.org.uk/myradio' stage('Deploy prod client') {
REACT_APP_MYRADIO_BASE = 'https://ury.org.uk/api/v2' environment {
} REACT_APP_MYRADIO_NONAPI_BASE = 'https://ury.org.uk/myradio'
steps { REACT_APP_MYRADIO_BASE = 'https://ury.org.uk/api/v2'
sh 'sed -i -e \'s/ury.org.uk\\/webstudio-dev/ury.org.uk\\/webstudio/\' package.json' }
sh 'yarn build' steps {
sshagent(credentials: ['ury']) { sh 'sed -i -e \'s/ury.org.uk\\/webstudio-dev/ury.org.uk\\/webstudio/\' package.json'
sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio' sh 'yarn build'
sshagent(credentials: ['ury']) {
sh 'rsync -av --delete-after build/ deploy@ury:/usr/local/www/webstudio'
}
}
}
stage('Deploy server') {
steps {
sshagent(credentials: ['ury']) {
sh 'scp -v server.py liquidsoap@urysteve.ury:/opt/webstudioserver/server.py'
}
}
} }
} }
} }