Add CI build/publish pipeline
parent
b76eaa6427
commit
15a402d989
|
@ -0,0 +1,11 @@
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
RUN echo jenkins:*:3000018:3000017::/var/lib/jenkins:/bin/bash >> /etc/passwd
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add zola --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ && \
|
||||||
|
apk add \
|
||||||
|
openssh-client-default \
|
||||||
|
rsync \
|
||||||
|
&& \
|
||||||
|
rm -rf /var/cache/apk/*
|
|
@ -0,0 +1,36 @@
|
||||||
|
// vim: set ft=groovy sw=4 ts=4 sts=4 et :
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'ci'
|
||||||
|
filename 'Containerfile'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
pollSCM ''
|
||||||
|
}
|
||||||
|
|
||||||
|
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_HOST}:${PUBLISH_PATH}
|
Loading…
Reference in New Issue