diff --git a/Jenkinsfile b/Jenkinsfile index 980ef3f..6de3060 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -393,18 +393,22 @@ def deployRelease(def categoryList, def json){ String smartgears def categories=categoryList.split(',') json.gCube_release.Components.each { group_name, component_list -> - for ( def category : categories){ - println ("processing category: "+category) - if("${group_name}" == "$category"){ - if (category == 'Distribution'){ - //searching smartgears-distribution version in Distribution component of defined inside the yaml file - def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }} - smartgears=(sg !=null ) ? sg[0] : null - println("smartgears version is ${smartgears}") - return + if (categories.contains(group_name)){ + println("found category "+group_name+" it is contained in categories to search: "+categories); + for ( def category : categories){ + println ("processing category: "+category) + if("${group_name}" == "$category"){ + if (category == 'Distribution'){ + //searching smartgears-distribution version in Distribution component of defined inside the yaml file + def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }} + smartgears=(sg !=null ) ? sg[0] : null + println("smartgears version is ${smartgears}") + return + } + releaseList += component_list?.collect {return "$it.name,$it.version" } + println("found ${releaseList}"); } - releaseList += component_list?.collect {return "$it.name,$it.version" } - println("found ${releaseList}"); + } } }