2020-10-10 07:15:24 +02:00
|
|
|
pipeline {
|
2020-10-10 08:33:39 +02:00
|
|
|
agent any
|
2020-10-10 08:10:50 +02:00
|
|
|
|
2020-10-10 08:27:53 +02:00
|
|
|
options {
|
|
|
|
preserveStashes()
|
|
|
|
}
|
|
|
|
|
2020-10-10 07:15:24 +02:00
|
|
|
stages {
|
|
|
|
stage('Build') {
|
2020-10-10 08:07:55 +02:00
|
|
|
parallel {
|
|
|
|
stage('HTML') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'silex/emacs:27.1-alpine-dev'
|
|
|
|
args '-u root --privileged'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
sh 'cask'
|
|
|
|
sh 'make html'
|
2020-10-10 08:15:14 +02:00
|
|
|
stash includes: 'public/**', name: 'public_html'
|
2020-10-10 08:07:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('CSS') {
|
|
|
|
agent { dockerfile true }
|
|
|
|
|
|
|
|
steps {
|
|
|
|
sh 'make css'
|
2020-10-10 08:15:14 +02:00
|
|
|
stash includes: 'public/**', name: 'public_css'
|
2020-10-10 08:07:55 +02:00
|
|
|
}
|
|
|
|
}
|
2020-10-10 07:20:16 +02:00
|
|
|
}
|
2020-09-21 10:44:42 +02:00
|
|
|
}
|
|
|
|
|
2020-10-10 07:15:24 +02:00
|
|
|
stage('Deploy') {
|
2020-10-10 08:07:55 +02:00
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'instrumentisto/rsync-ssh'
|
2020-10-10 08:18:50 +02:00
|
|
|
args '-u root --privileged'
|
2020-10-10 08:07:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-10 07:20:16 +02:00
|
|
|
steps {
|
|
|
|
unstash 'public_html'
|
2020-10-10 08:07:55 +02:00
|
|
|
unstash 'public_css'
|
2020-09-21 10:44:42 +02:00
|
|
|
|
2020-10-10 07:20:16 +02:00
|
|
|
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/"'
|
|
|
|
}
|
2020-09-21 10:44:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|