pipeline { agent { dockerfile true } stages { stage('Build') { steps { sh 'make' stash includes: 'public/*', name: 'public_html' } } stage('Deploy') { steps { 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/"' } } } } }