Add Jenkinsfile
This commit is contained in:
parent
2620ee69bf
commit
6dbbe818ca
1 changed files with 22 additions and 0 deletions
22
Jenkinsfile
vendored
Normal file
22
Jenkinsfile
vendored
Normal file
|
@ -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:"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue