From 2a2bd05f8cbb8c64ab63206e3a622fb8ee81a943 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 10 Oct 2020 01:02:05 -0700 Subject: Add known hosts to the rsync command --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 98fbd62..e153d6c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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/"' } } } -- cgit v1.2.3-54-g00ecf