mayekkuzu
aed8413a34
Some checks failed
Job Folder/Gitea Instance/psniquiz/pipeline/head There was a failure building this commit
14 lines
484 B
Groovy
14 lines
484 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 --exclude={"Jenkinsfile"} ssh * ${USERNAME}@${SERVER_IP}:/var/www/public_html'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |