Escape backslashes

I’m not sure how/when to escape these in declarative pipelines
This commit is contained in:
Tom Willemse 2020-10-10 01:05:47 -07:00
parent 2a2bd05f8c
commit 0c0c1602e4

2
Jenkinsfile vendored
View file

@ -48,7 +48,7 @@ pipeline {
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/"'
sh 'rsync -e "ssh -p 4511 -o \\"UserKnownHostsFile $KNOWN_HOSTS_FILE\\" -i $KEY_FILE" -v -c -r --delete public/ "site@ryuslash.org:public_html/"'
}
}
}