Updated matrix in Jenkinsfile
This commit is contained in:
104
Jenkinsfile
vendored
104
Jenkinsfile
vendored
@@ -3,64 +3,58 @@ pipeline {
|
|||||||
options {
|
options {
|
||||||
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
|
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
|
||||||
}
|
}
|
||||||
matrix {
|
stages {
|
||||||
axes {
|
stage("Parallel Hello") {
|
||||||
axis {
|
matrix {
|
||||||
name 'ImgRelease'
|
axes {
|
||||||
values '3.13 edge'
|
axis {
|
||||||
}
|
name 'ImgRelease'
|
||||||
axis {
|
values '3.13 edge'
|
||||||
name 'ImgVariant'
|
}
|
||||||
values 'default extended'
|
axis {
|
||||||
}
|
name 'ImgVariant'
|
||||||
}
|
values 'default extended'
|
||||||
excludes {
|
}
|
||||||
exclude {
|
|
||||||
axis {
|
|
||||||
name 'ImgRelease'
|
|
||||||
values 'edge'
|
|
||||||
}
|
}
|
||||||
axis {
|
excludes {
|
||||||
name 'ImgVariant'
|
exclude {
|
||||||
notValues 'default'
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
success {
|
|
||||||
echo 'Build successful'
|
|
||||||
}
|
|
||||||
failure {
|
|
||||||
echo 'Build Failed'
|
|
||||||
// Send To static addres
|
|
||||||
//emailext attachLog: true,body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'bram@bprieshof.nl'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user