generated from gCubeCI/Pipeline-Docker-Template
optimize method deployRelease
This commit is contained in:
parent
eb7bf27c81
commit
b0c0011a63
|
@ -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}");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue