wip: ci: run in kubernetes
dustin/basementhud/pipeline/pr-master There was a failure building this commit
Details
dustin/basementhud/pipeline/pr-master There was a failure building this commit
Details
parent
03da29b5a6
commit
49dbcec904
|
@ -0,0 +1,11 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[Jenkinsfile]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
|
@ -1,11 +1,8 @@
|
||||||
DOCKER_BUILD_ARGS = '''\
|
|
||||||
--build-arg UID=$(id -u) \
|
|
||||||
--build-arg GID=$(id -g) \
|
|
||||||
'''
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
label 'docker && aarch64'
|
kubernetes {
|
||||||
|
yamlFile 'ci/podTemplate.yaml'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
@ -13,10 +10,6 @@ pipeline {
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
}
|
}
|
||||||
|
|
||||||
triggers {
|
|
||||||
pollSCM ''
|
|
||||||
}
|
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
booleanParam \
|
booleanParam \
|
||||||
name: 'Clean',
|
name: 'Clean',
|
||||||
|
@ -25,19 +18,19 @@ pipeline {
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
agent {
|
|
||||||
dockerfile {
|
|
||||||
reuseNode true
|
|
||||||
dir 'ci'
|
|
||||||
args '--privileged -u 0:0'
|
|
||||||
additionalBuildArgs DOCKER_BUILD_ARGS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
container('build') {
|
||||||
if (params.Clean) {
|
script {
|
||||||
sh 'rm -rf _build'
|
if (params.Clean) {
|
||||||
|
sh 'rm -rf _build'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
copyArtifacts \
|
||||||
|
filter: 'aarch64/mqttdpms',
|
||||||
|
projectName: '../mqttdpms/master',
|
||||||
|
selector: lastSuccessful()
|
||||||
|
sh 'install aarch64/mqttdpms overlay/usr/local/bin/'
|
||||||
|
sh 'make rootfs initramfs'
|
||||||
}
|
}
|
||||||
copyArtifacts \
|
copyArtifacts \
|
||||||
filter: 'aarch64/mqttdpms',
|
filter: 'aarch64/mqttdpms',
|
||||||
|
@ -54,17 +47,11 @@ pipeline {
|
||||||
changeRequest()
|
changeRequest()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
agent {
|
|
||||||
dockerfile {
|
|
||||||
reuseNode true
|
|
||||||
dir 'ci'
|
|
||||||
args '-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts'
|
|
||||||
additionalBuildArgs DOCKER_BUILD_ARGS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
sshagent(['jenkins-pxe']) {
|
container('publish') {
|
||||||
sh 'make publish'
|
sshagent(['jenkins-pxe']) {
|
||||||
|
sh 'make publish'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
|
terminationGracePeriodSeconds: 0
|
||||||
|
containers:
|
||||||
|
- name: build
|
||||||
|
image: registry.pyrocufflink.blue/build/basementhud
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
- infinity
|
||||||
|
securityContext:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
privileged: true
|
||||||
|
- name: publish
|
||||||
|
image: registry.fedoraproject.org/fedora
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
- infinity
|
||||||
|
securityContext:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsUser: 1000
|
Loading…
Reference in New Issue