Add CI build/publish pipeline
parent
b76eaa6427
commit
c4b73a869e
|
@ -0,0 +1,11 @@
|
|||
FROM alpine
|
||||
|
||||
RUN useradd -u 3000018 -l -M -d / jenkins
|
||||
|
||||
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_USER}:${PUBLISH_PATH}
|
Loading…
Reference in New Issue