Updated Jenkinsfile

This commit is contained in:
mayekkuzu 2024-09-26 21:13:31 +03:00
parent d87369e9e6
commit b7574d871b

1
Jenkinsfile vendored
View File

@ -5,6 +5,7 @@ pipeline {
stage('Copy Files on Server') { stage('Copy Files on Server') {
steps { steps {
withCredentials([usernamePassword(credentialsId: 'QuizServerCreds', usernameVariable: 'USERNAME', passwordVariable: 'SERVER_IP')]) { withCredentials([usernamePassword(credentialsId: 'QuizServerCreds', usernameVariable: 'USERNAME', passwordVariable: 'SERVER_IP')]) {
sh 'mkdir ~/.ssh'
sh 'ssh-keyscan ${SERVER_IP} > ~/.ssh/known_hosts' sh 'ssh-keyscan ${SERVER_IP} > ~/.ssh/known_hosts'
sh 'rsync -avzhe ssh * ${USERNAME}@${SERVER_IP}:/var/www/public_html' sh 'rsync -avzhe ssh * ${USERNAME}@${SERVER_IP}:/var/www/public_html'
} }