Files
LXC-AlpineTesting/Jenkinsfile

60 lines
2.3 KiB
Groovy

pipeline {
agent { label 'LXCBuilder' }
options {
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
}
stages {
stage("Parallel Hello") {
matrix {
axes {
axis {
name 'ImgRelease'
values '3.13 edge'
}
axis {
name 'ImgVariant'
values 'default extended'
}
}
excludes {
exclude {
axis {
name 'ImgRelease'
values 'edge'
}
axis {
name 'ImgVariant'
notValues 'default'
}
}
}
// all the stages here will run in parallel
stages {
stage('Prepare') {
steps {
// Get distrobuilder
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
}
}
stage('Build') {
steps {
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
// Build SH script
sh '''sudo $WORKSPACE/distrobuilder build-lxc Alpine.yaml ./ -o image.release=$ImgRelease -o image.variant=$ImgVariant
sudo chown jenkins:jenkins $WORKSPACE/*.tar.xz
'''
}
}
stage('Finish') {
steps {
// Save generated files
archiveArtifacts artifacts: '*.tar.xz', followSymlinks: false
// Cleaning WorkSpace
cleanWs()
}
}
}
}
}
}
}