From f823ac8d197fdc6797e2c3b1b050016b5f9f4bf1 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 16 Jun 2023 09:41:08 +0200 Subject: [PATCH] fix collection --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8138ac1..2c40755 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -369,7 +369,7 @@ def deployRelease(def categoryList, def yaml){ //def portlets="{\"generic_portlets\": "; // portlets += component_list?.collect{ return [ 'name': "$it.name", 'version': "$it.version", 'extension': 'war' ] } // portlets += component_list?.collect{ return " {\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "} - portlets += component_list?.collect{ if ($it.group_id != null) return "{\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "; else return "{\"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"}"} + portlets += component_list?.collect{ if ("${it.group_id}" != null) return "{\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "; else return "{\"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"}"} // portlets.removeAll(["\"group_id\": \"null\""]); echo "portlets: $portlets" def jsonContent= "{\"generic_portlets\": "+portlets+"}"