aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile6
-rw-r--r--Jenkinsfile42
2 files changed, 33 insertions, 15 deletions
diff --git a/Dockerfile b/Dockerfile
index 0b18c08..030869c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,3 @@
-FROM silex/emacs:27.1-alpine-dev
+FROM alpine:3.12
-RUN git clone https://github.com/cask/cask.git /usr/local/cask
-ENV PATH="/usr/local/cask/bin:$PATH"
-RUN cask upgrade-cask
+RUN apk add --no-cache make npm && npm -g install less
diff --git a/Jenkinsfile b/Jenkinsfile
index 72e4c97..fd6c7ae 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,23 +1,43 @@
pipeline {
- agent {
- docker {
- image 'silex/emacs:27.1-alpine-dev'
- args '-u root --privileged'
- }
- }
-
stages {
stage('Build') {
- steps {
- sh 'cask'
- sh 'make'
- stash includes: 'public/*', name: 'public_html'
+ parallel {
+ stage('HTML') {
+ agent {
+ docker {
+ image 'silex/emacs:27.1-alpine-dev'
+ args '-u root --privileged'
+ }
+ }
+
+ steps {
+ sh 'cask'
+ sh 'make html'
+ stash includes: 'public/*', name: 'public_html'
+ }
+ }
+
+ stage('CSS') {
+ agent { dockerfile true }
+
+ steps {
+ sh 'make css'
+ stash includes: 'public/*', name: 'public_css'
+ }
+ }
}
}
stage('Deploy') {
+ agent {
+ docker {
+ image 'instrumentisto/rsync-ssh'
+ }
+ }
+
steps {
unstash 'public_html'
+ unstash 'public_css'
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/"'