diff --git a/Jenkinsfile b/Jenkinsfile index b6aaf8d..8138ac1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -368,8 +368,9 @@ def deployRelease(def categoryList, def yaml){ }else if (category =="${PORTLET_CATEGORY}"){ //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.removeAll(["\"group_id\": \"null\""]); +// 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.removeAll(["\"group_id\": \"null\""]); echo "portlets: $portlets" def jsonContent= "{\"generic_portlets\": "+portlets+"}" echo "json: $jsonContent"