psniquiz/Jenkinsfile
mayekkuzu 103d62faf5
All checks were successful
Job Folder/Gitea Instance/psniquiz/pipeline/head This commit looks good
Updated Jenkinsfile
2024-09-26 20:24:02 +03:00

14 lines
458 B
Groovy

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