83 lines
2.0 KiB
Groovy
83 lines
2.0 KiB
Groovy
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
dir 'ci'
|
|
args '''
|
|
-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts
|
|
--pids-limit 16384
|
|
'''
|
|
additionalBuildArgs '''\
|
|
--build-arg UID=$(id -u) \
|
|
--build-arg GID=$(id -g) \
|
|
'''
|
|
}
|
|
}
|
|
|
|
options {
|
|
disableConcurrentBuilds()
|
|
}
|
|
|
|
triggers {
|
|
pollSCM ''
|
|
}
|
|
|
|
parameters {
|
|
booleanParam \
|
|
name: 'Clean',
|
|
description: 'Clean the workspace and perform a full rebuild'
|
|
}
|
|
|
|
environment {
|
|
BUILDROOT_SRC = "${env.WORKSPACE}/buildroot"
|
|
}
|
|
|
|
stages {
|
|
stage('Prepare') {
|
|
steps {
|
|
script {
|
|
if (params.Clean) {
|
|
sh 'rm -rf _build'
|
|
}
|
|
}
|
|
checkout poll: false, scm: [
|
|
$class: 'GitSCM',
|
|
branches: [[name: '2022.02.x']],
|
|
doGenerateSubmoduleConfigurations: false,
|
|
userRemoteConfigs: [[url: 'git://git.buildroot.net/buildroot']],
|
|
extensions: [
|
|
[
|
|
$class: 'RelativeTargetDirectory',
|
|
relativeTargetDir: 'buildroot',
|
|
],
|
|
],
|
|
]
|
|
sh '. ci/prepare.sh'
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
parallel {
|
|
stage('Build Initramfs') {
|
|
steps {
|
|
sh '. ci/build-initramfs.sh'
|
|
}
|
|
}
|
|
|
|
stage('Build Rootfs') {
|
|
steps {
|
|
sh '. ci/build-rootfs.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Publish') {
|
|
steps {
|
|
sshagent(['jenkins-pxe']) {
|
|
sh '. ci/publish.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|