From 6dbbe818cad81eff3107e35037f722a8870ea834 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 21 Sep 2020 01:44:42 -0700 Subject: [PATCH] Add Jenkinsfile --- Jenkinsfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..812f8c1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,22 @@ +def dockerImage = 'silex/emacs:27.1-alpine-dev' + +node('docker') { + checkout scm + + stage('Build') { + docker.image(dockerImage).inside { + sh 'make' + stash includes: 'public/*', name: 'public_html' + } + } + + stage('Deploy') { + docker.image('instrumentisto/rsync-ssh').inside { + 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:"' + } + } + } +}