From c6e62514c45d9809665329b1e37df03396dc23de Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Wed, 4 Sep 2019 13:11:51 -0400 Subject: [PATCH] Avoid parallel to run a null closure. --- Jenkinsfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d31728f..4c58898 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -122,8 +122,10 @@ pipeline { } def buildComponents(args) { - parallel args.items?.collectEntries { name -> [ "${name}": { - if (!"NONE".equalsIgnoreCase(name)) - build name - }]} + if (args.items) { + parallel args.items?.collectEntries { name -> [ "${name}": { + if (!"NONE".equalsIgnoreCase(name)) + build name + }]} + } } \ No newline at end of file