Files
basementhud/ci/Jenkinsfile
Dustin C. Hatch 03da29b5a6
All checks were successful
dustin/basementhud/pipeline/head This commit looks good
ci: Update mqttdpms Jenkins project name
I've switched Jenkins to use a Gitea Organization Folder so it can
auto-discover repositories owned by my Gitea user.  This naturally
required the paths of existing projects to change.  Here, we're updating
the path to the *mqttdpms* project to reflect its new location.
2022-08-23 09:40:14 -05:00

73 lines
1.7 KiB
Groovy

DOCKER_BUILD_ARGS = '''\
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
'''
pipeline {
agent {
label 'docker && aarch64'
}
options {
buildDiscarder logRotator(numToKeepStr: '5')
disableConcurrentBuilds()
}
triggers {
pollSCM ''
}
parameters {
booleanParam \
name: 'Clean',
description: 'Clean the workspace and perform a full rebuild'
}
stages {
stage('Build') {
agent {
dockerfile {
reuseNode true
dir 'ci'
args '--privileged -u 0:0'
additionalBuildArgs DOCKER_BUILD_ARGS
}
}
steps {
script {
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'
}
}
stage('Publish') {
when {
not {
changeRequest()
}
}
agent {
dockerfile {
reuseNode true
dir 'ci'
args '-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts'
additionalBuildArgs DOCKER_BUILD_ARGS
}
}
steps {
sshagent(['jenkins-pxe']) {
sh 'make publish'
}
}
}
}
}