From 8d65b2bd4f5fa378d010fbb32e1fef155da86c96 Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Wed, 4 Sep 2019 12:12:10 -0400 Subject: [PATCH] Manage NPE when a group is not available in the release file. --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ee258cf..00e7dc8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,7 +97,7 @@ pipeline { stage('build SmartGears components') { steps { withMaven(jdk: "${maven_jdk}", mavenLocalRepo: "${maven_local_repo_path}", mavenSettingsFilePath: "${maven_settings_file}") { - buildComponents items: jsonConfig.gCube_release.Components.SmartGears.collect { "${it.name}" } + buildComponents items: jsonConfig.gCube_release.Components.SmartGears?.collect { "${it.name}" } } echo "Done with SmartGears components" } @@ -105,7 +105,7 @@ pipeline { stage('build Enabling components') { steps { withMaven(jdk: "${maven_jdk}", mavenLocalRepo: "${maven_local_repo_path}", mavenSettingsFilePath: "${maven_settings_file}") { - buildComponents items: jsonConfig.gCube_release.Components.Enabling.collect { "${it.name}" } + buildComponents items: jsonConfig.gCube_release.Components.Enabling?.collect { "${it.name}" } } echo "Done with Enabling components" } @@ -113,7 +113,7 @@ pipeline { stage('build Data components') { steps { withMaven(jdk: "${maven_jdk}", mavenLocalRepo: "${maven_local_repo_path}", mavenSettingsFilePath: "${maven_settings_file}") { - buildComponents items: jsonConfig.gCube_release.Components.Data.collect { "${it.name}" } + buildComponents items: jsonConfig.gCube_release.Components.Data?.collect { "${it.name}" } } echo "Done with Data components" }