Add known hosts to the rsync command
This commit is contained in:
parent
cb771cd950
commit
2a2bd05f8c
1 changed files with 3 additions and 2 deletions
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
|
@ -46,8 +46,9 @@ pipeline {
|
|||
unstash 'public_html'
|
||||
unstash 'public_css'
|
||||
|
||||
withCredentials([file(credentialsId: 'ryuslash.org-deploy-key-2', variable: 'KEY_FILE')]) {
|
||||
sh 'rsync -e "ssh -p 4511 -i $KEY_FILE" -v -c -r --delete public/ "site@ryuslash.org:public_html/"'
|
||||
withCredentials([file(credentialsId: 'ryuslash.org-deploy-key-2', variable: 'KEY_FILE'),
|
||||
file(credentialsId: 'ryuslash-known-hosts', variable: 'KNOWN_HOSTS_FILE')]) {
|
||||
sh 'rsync -e "ssh -p 4511 -o \"UserKnownHostsFile $KNOWN_HOSTS_FILE\" -i $KEY_FILE" -v -c -r --delete public/ "site@ryuslash.org:public_html/"'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue