wip: ci: Build in Kubernetes
dustin/dustin.web/pipeline/pr-master There was a failure building this commit
Details
dustin/dustin.web/pipeline/pr-master There was a failure building this commit
Details
parent
77ace212f2
commit
5c858492cf
|
@ -1,15 +0,0 @@
|
|||
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 \
|
||||
python3 \
|
||||
py3-ruamel.yaml \
|
||||
rsync \
|
||||
&& \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY ssh_known_hosts /etc/ssh/ssh_known_hosts
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
dir 'ci'
|
||||
filename 'Containerfile'
|
||||
kubernetes {
|
||||
yamlFile 'ci/podTemplate.yaml'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,22 +11,25 @@ pipeline {
|
|||
disableConcurrentBuilds()
|
||||
}
|
||||
|
||||
triggers {
|
||||
pollSCM ''
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '. ci/build.sh'
|
||||
container('zola') {
|
||||
sh 'zola build --base-url /'
|
||||
}
|
||||
container('python') {
|
||||
sh '. ci/build.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
steps {
|
||||
sshagent(['jenkins-web']) {
|
||||
sh '. ci/publish.sh'
|
||||
container('rsync') {
|
||||
sshagent(['jenkins-web']) {
|
||||
sh '. ci/publish.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
zola build --base-url /
|
||||
|
||||
python3 /dev/fd/3 < songquotes.yml > public/songquotes.json 3<<EOF
|
||||
from ruamel.yaml import safe_load as load
|
||||
from json import dump
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
containers:
|
||||
- name: zola
|
||||
image: ghcr.io/getzola/zola:v0.16.0
|
||||
# Literally the only commands in the *zola* container image are
|
||||
# `zola`, `openssl`, and `c_rehash`.
|
||||
command:
|
||||
- openssl
|
||||
stdin: true
|
||||
tty: true
|
||||
- name: python
|
||||
image: docker.io/python:3.10
|
||||
command:
|
||||
- python
|
||||
args:
|
||||
- -c
|
||||
- import signal; signal.pause()
|
||||
- name: rsync
|
||||
image: git.pyrocufflink.net/containerimages/rsync
|
||||
command:
|
||||
- python3
|
||||
args:
|
||||
- -c
|
||||
- import signal; signal.pause()
|
Loading…
Reference in New Issue