wip: ci: Add Jenkins build+publish pipeline
infra/kickstart/pipeline/head There was a failure building this commit
Details
infra/kickstart/pipeline/head There was a failure building this commit
Details
parent
fcfba058f3
commit
a61300f2af
5
Makefile
5
Makefile
|
@ -4,12 +4,15 @@ KICKSTARTS = \
|
||||||
fedora-rpi.ks \
|
fedora-rpi.ks \
|
||||||
fedora.ks
|
fedora.ks
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean publish
|
||||||
|
|
||||||
all: $(KICKSTARTS)
|
all: $(KICKSTARTS)
|
||||||
|
|
||||||
%.ks: %.ks.j2
|
%.ks: %.ks.j2
|
||||||
python3 render.py $< > $@
|
python3 render.py $< > $@
|
||||||
|
|
||||||
|
publish:
|
||||||
|
sh publish.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(KICKSTARTS)
|
rm -f $(KICKSTARTS)
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
yamlFile 'ci/podTemplate.yaml'
|
||||||
|
yamlMergeStrategy merge()
|
||||||
|
defaultContainer 'build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'make'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish') {
|
||||||
|
environment {
|
||||||
|
PUBLISH_PATH = "/var/www/html/kickstart/${BRANCH_NAME}/"
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sshagent(['jenkins-pxe']) {
|
||||||
|
sh 'make publish'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: build
|
||||||
|
image: git.pyrocufflink.net/containerimages/jenkins-common
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /etc/ssh/ssh_known_hosts
|
||||||
|
name: ssh-known-hosts
|
||||||
|
subPath: ssh_known_hosts
|
||||||
|
volumes:
|
||||||
|
- name: ssh-known-hosts
|
||||||
|
configMap:
|
||||||
|
name: ssh-known-hosts
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: "${PUBLISH_HOST:=$(getent hosts pxe.pyrocufflink.blue | cut -d' ' -f2 | head -n1)}"
|
||||||
|
: "${PUBLISH_PATH:=/var/www/html/kickstart/}"
|
||||||
|
|
||||||
|
rsync ${PRETEND+-n} -aiFF ./ "${PUBLISH_HOST}:${PUBLISH_PATH}"
|
Loading…
Reference in New Issue