Skip to content

Commit

Permalink
Jenkinsfile: Change variant list handling
Browse files Browse the repository at this point in the history
Signed-off-by: Fisnik Hajredini <fhajredini@luxoft.com>
(cherry picked from commit cdccedc)
  • Loading branch information
fhajredini authored and Therese Nordqvist committed Mar 19, 2019
1 parent 6375156 commit d1e1474
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,22 @@ void buildBistro(String variant, String imageName) {
}

def variantMap = [:]
def variantList = env.VARIANT_LIST.split()
def variantList = []

// If VARIANT_LIST is defined in the Jenkins Environment
// then use that, otherwise use the default
// Note: This function will throw a NullPointerException if the
// variable is not set.
try {
variantList = env.VARIANT_LIST.split()
echo "Using the specified variant list for build"
println "[\"${variantList.join('", "')}\"]"
} catch(e) {
println("Using the default variant list for build. \nCaught error: " + e)
variantList = ['intel-qtauto:core-image-pelux-qtauto-neptune-dev',
'rpi-qtauto:core-image-pelux-qtauto-neptune-dev']
println "[\"${variantList.join('", "')}\"]"
}

variantList.each {
def list = it.split(":")
Expand Down

0 comments on commit d1e1474

Please sign in to comment.