pipeline { agent { dockerfile true } stages { stage('Build') { sh 'make' stash includes: 'public/*', name: 'public_html' } stage('Deploy') { unstash 'public_html' withCredentials([file(credentialsId: 'ryuslash.org-deploy-key', variable: 'KEY_FILE')]) { sh 'rsync -e "ssh -p 4511 -i $KEY_FILE" -v -c -r --delete public/ "site@ryuslash.org:public_html/"' } } } }