ci: Begin Jenkins build pipeline
parent
65988b0c32
commit
15fbb180d0
|
@ -0,0 +1,57 @@
|
|||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
yamlFile 'ci/podTemplate.yaml'
|
||||
yamlMergeStrategy merge()
|
||||
defaultContainer 'buildah'
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Gentoo Stage 3') {
|
||||
steps {
|
||||
sh 'sh -e image-build/gentoo-stage3.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Base') {
|
||||
steps {
|
||||
sh 'sh -e image-build/base.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Cross') {
|
||||
steps {
|
||||
sh 'sh -e image-build/cross.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'sh -e image-build/build.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Push') {
|
||||
steps {
|
||||
withEnv([
|
||||
"REGISTRY_AUTH_FILE=${env.WORKSPACE_TMP}/auth.json"
|
||||
]) {
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: 'jenkins-packages',
|
||||
usernameVariable: 'BUILDAH_USERNAME',
|
||||
passwordVariable: 'BUILDAH_PASSWORD',
|
||||
)]) {
|
||||
sh """
|
||||
buildah login \
|
||||
--username \${BUILDAH_USERNAME} \
|
||||
--password \${BUILDAH_PASSWORD} \
|
||||
git.pyrocufflink.net
|
||||
"""
|
||||
}
|
||||
sh 'buildah push aimee-os.org/build/cross-aarch64-unknown-linux-gnu git.pyrocufflink.net/aimeeos/build/cross-aarch64-unknown-linux-gnu'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
spec:
|
||||
containers:
|
||||
- name: buildah
|
||||
image: quay.io/containers/buildah:v1
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
trap 'kill $!; exit' TERM
|
||||
rm -f ~/.config/containers/storage.conf
|
||||
sleep infinity &
|
||||
wait
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
resources:
|
||||
limits:
|
||||
github.com/fuse: 1
|
||||
tolerations:
|
||||
- key: du5t1n.me/jenkins
|
Reference in New Issue