1
0
Fork 0

Compare commits

..

1 Commits

Author SHA1 Message Date
Dustin 87af8894d9 Begin Jenkins CI pipeline
dustin/pythonctnr/pipeline/head This commit looks good Details
2022-08-07 11:25:36 -05:00
7 changed files with 4 additions and 69 deletions

20
ci/Jenkinsfile vendored
View File

@ -47,25 +47,11 @@ pipeline {
stage('Build') {
steps {
sh '. ci/build.sh'
}
}
stage('Build Container') {
steps {
container('buildah') {
sh '. ci/build-container.sh'
}
}
}
stage('Publish Container') {
steps {
container('buildah') {
sh '. ci/publish-container.sh'
}
sh 'make -C buildroot O="${PWD}"/_build BR2_EXTERNAL="${PWD}" pythonctnr_defconfig'
sh 'make -C _build'
}
}
}
}

View File

@ -1,7 +0,0 @@
#!/bin/sh
. ci/container-common.sh
ctnr=$(buildah from scratch)
buildah add ${ctnr} _build/images/rootfs.tar /
buildah commit ${ctnr} pythonctnr:$(tag_name ${BUILD_TAG})

View File

@ -1,5 +0,0 @@
#!/bin/sh
# vim: set sw=4 ts=4 sts=4 et :
make -C buildroot O="${PWD}"/_build BR2_EXTERNAL="${PWD}" pythonctnr_defconfig
make -C _build

View File

@ -1,5 +0,0 @@
# shellcheck: shell=sh
tag_name() {
echo "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g' -e 's/^[.-]/_/'
}

View File

@ -2,6 +2,7 @@ spec:
securityContext:
fsGroup: 1000
containers:
- name: jnlp
- name: buildroot
image: registry.pyrocufflink.blue/buildroot
command:
@ -13,13 +14,6 @@ spec:
securityContext:
readOnlyRootFilesystem: true
runAsUser: 1000
- name: buildah
image: quay.io/containers/buildah:v1
command:
- sleep
- infinity
securityContext:
privileged: true
volumes:
- name: tmp
emptyDir:

View File

@ -1,14 +0,0 @@
#!/bin/sh -ex
. ci/container-common.sh
push() {
tag=$(tag_name "$1")
buildah push pythonctnr:$(tag_name ${BUILD_TAG}) registry.pyrocufflink.blue/pythonctnr:${tag}
}
push ${BUILD_TAG}
push ${BRANCH_NAME}
if [ "${BRANCH_NAME}" = master ]; then
push latest
fi

View File

@ -1,14 +0,0 @@
# This persistent volume claim must be created before the job can run:
#
# kubectl apply -n jenkins -f ci/pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jenkins-ws-pythonctnr
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi