try to remove the null values

This commit is contained in:
Roberto Cirillo 2023-06-16 09:16:19 +02:00
parent 2fbc25b0fd
commit 87931065a3
1 changed files with 1 additions and 0 deletions

1
Jenkinsfile vendored
View File

@ -369,6 +369,7 @@ def deployRelease(def categoryList, def yaml){
//def portlets="{\"generic_portlets\": "; //def portlets="{\"generic_portlets\": ";
// portlets += component_list?.collect{ return [ 'name': "$it.name", 'version': "$it.version", 'extension': 'war' ] } // 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{ return " {\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "}
portlets.removeAll([null]);
echo "portlets: $portlets" echo "portlets: $portlets"
def jsonContent= "{\"generic_portlets\": "+portlets+"}" def jsonContent= "{\"generic_portlets\": "+portlets+"}"
echo "json: $jsonContent" echo "json: $jsonContent"