modify Jenkinsfile

master
TBS093A 2022-03-01 15:45:42 +01:00
parent fe7169f616
commit 787e17ea4e
1 changed files with 12 additions and 7 deletions

5
Jenkinsfile vendored
View File

@ -58,6 +58,9 @@ pipeline {
steps { steps {
echo '#3 Deploy App' echo '#3 Deploy App'
withCredentials([sshUserPrivateKey(credentialsId: 'cv-kamil-zuk', keyFileVariable: 'PRIV_KEY')]) {
script {
echo '######################################################################' echo '######################################################################'
echo '### transfer files from jenkins pipeline to remote nginx as static ###' echo '### transfer files from jenkins pipeline to remote nginx as static ###'
echo '######################################################################' echo '######################################################################'
@ -65,6 +68,8 @@ pipeline {
sh ''' sh '''
scp -v -o StrictHostKeyChecking=no -i $PRIV_KEY -r ./public/* ubuntu@13.48.201.185:/home/ubuntu/docker-compose/volumes/https-nginx-static/kamil-zuk-cv.tk scp -v -o StrictHostKeyChecking=no -i $PRIV_KEY -r ./public/* ubuntu@13.48.201.185:/home/ubuntu/docker-compose/volumes/https-nginx-static/kamil-zuk-cv.tk
''' '''
}
}
echo 'Deploy Success' echo 'Deploy Success'