generated from gCubeCI/Pipeline-Docker-Template
fix collection
This commit is contained in:
parent
30f75a203e
commit
0ec2f9b56d
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue