mayekkuzu
370ecc6556
Some checks failed
Jobs Folder/Gitea Instance/pipeline/head There was a failure building this commit
15 lines
508 B
Groovy
15 lines
508 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Copy Files on Server') {
|
|
steps {
|
|
withCredentials([usernamePassword(credentialsId: 'QuizServerCreds', usernameVariable: 'USERNAME', passwordVariable: 'SERVER_IP')]) {
|
|
sh 'touch ~/.ssh/known_hosts'
|
|
sh 'ssh-keyscan ${SERVER_IP} > ~/.ssh/known_hosts'
|
|
sh 'rsync -avzhe ssh * ${USERNAME}@${SERVER_IP}:/var/www/public_html'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |