From de1e8cfd0154ec2ab9ae973ede863a40dabef34b Mon Sep 17 00:00:00 2001 From: "roberto.cirillo" Date: Wed, 12 Oct 2022 10:20:56 +0200 Subject: [PATCH] try to set more than one yaml section on env var DEPLOY_CATEGORY --- Jenkinsfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a2da86e..6682cda 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -217,15 +217,20 @@ pipeline { } steps { script{ + if("${DEPLOY_CATEGORY}"){ println("Going to deploy the Release components") def releaseList = [] + def categories="${DEPLOY_CATEGORY}".split(',') jsonConfig.gCube_release.Components.each { group_name, component_list -> - if("${group_name}" == "${DEPLOY_CATEGORY}"){ - releaseList += component_list?.collect {return "$it.name,$it.version" } - println("found ${releaseList}"); + for ( def category ; categories){ + if("${group_name}" == "${DEPLOY_CATEGORY}"){ + releaseList += component_list?.collect {return "$it.name,$it.version" } + println("found ${releaseList}"); + } } } deployReleaseJobs(releaseList); + } } } }