Update Jenkinsfile
Some checks failed
Jobs Folder/Gitea Instance/pipeline/head There was a failure building this commit
Some checks failed
Jobs Folder/Gitea Instance/pipeline/head There was a failure building this commit
This commit is contained in:
parent
b7574d871b
commit
370ecc6556
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -5,7 +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 'touch ~/.ssh/known_hosts'
|
||||||
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'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user