Add CI build/publish pipeline
parent
b76eaa6427
commit
6d2f43d996
|
@ -0,0 +1,6 @@
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ && \
|
||||||
|
apk add rsync && \
|
||||||
|
rm -rf /var/cache/apk/*
|
|
@ -0,0 +1,31 @@
|
||||||
|
// vim: set ft=groovy sw=4 ts=4 sts=4 et :
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'ci'
|
||||||
|
filename 'Containerfile'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh '. ci/build.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish') {
|
||||||
|
steps {
|
||||||
|
sshagent(['jenkins-web']) {
|
||||||
|
sh '. ci/publish.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
zola build
|
|
@ -0,0 +1,5 @@
|
||||||
|
PUBLISH_HOST=web0.pyrocufflink.blue
|
||||||
|
PUBLISH_USER=webapp.dchblog
|
||||||
|
PUBLISH_PATH=htdocs/
|
||||||
|
|
||||||
|
rsync -aP public/ ${PUBLISH_USER}@${PUBLISH_USER}:${PUBLISH_PATH}
|
Loading…
Reference in New Issue