Added comments

This commit is contained in:
2021-02-21 03:33:36 +01:00
parent 8782e0cf51
commit e1ce5de359
2 changed files with 17 additions and 15 deletions

2
Jenkinsfile vendored
View File

@@ -33,6 +33,7 @@ pipeline {
values 'Default-default', 'Extra-extended'
}
}
//Exclude unwanted conbinatinations
excludes {
exclude {
axis {
@@ -49,6 +50,7 @@ pipeline {
stages {
stage('Build image') {
when {
//ImgTypeTest
anyOf {
allOf {
expression { return (env.ImgVariant).startsWith('Default-') }

View File

@@ -29,22 +29,23 @@ pipeline {
script{
for(ImgRelease in ImgReleaseList){
for(ImgVariant in ImgVariantList){
//ImgTypeTest
if (env.BuildDefault == 'true' && (ImgVariant).startsWith('Default-')) {
echo 'Building Default'
BuildThis = true
} else if (env.BuildExtra == 'true' && (ImgVariant).startsWith('Extra-')) {
BuildThis = true
echo 'Building Extra'
} else {
BuildThis = false
echo 'not building'
}
//Exclude unwanted conbinatinations
if (ImgRelease == 'edge' && ImgVariant == 'Extra-extended' ){
BuildThis = false
}
//Check if this combinations shoud be build
if (BuildThis == true) {
env.ImgRelease = ImgRelease
env.ImgVariant = ImgVariant
stage('Build image') {
// steps {
// Build script
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh '''echo "$(date) Do Build for $ImgRelease - $ImgVariant"
ImgVariantName${ImgVariant#Default-} && ImgVariantName${ImgVariantName#Extra-}
@@ -54,7 +55,6 @@ pipeline {
'''
}
}
//}
}
}
}