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
|
String smartgears
|
||||||
def categories=categoryList.split(',')
|
def categories=categoryList.split(',')
|
||||||
json.gCube_release.Components.each { group_name, component_list ->
|
json.gCube_release.Components.each { group_name, component_list ->
|
||||||
for ( def category : categories){
|
if (categories.contains(group_name)){
|
||||||
println ("processing category: "+category)
|
println("found category "+group_name+" it is contained in categories to search: "+categories);
|
||||||
if("${group_name}" == "$category"){
|
for ( def category : categories){
|
||||||
if (category == 'Distribution'){
|
println ("processing category: "+category)
|
||||||
//searching smartgears-distribution version in Distribution component of defined inside the yaml file
|
if("${group_name}" == "$category"){
|
||||||
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
|
if (category == 'Distribution'){
|
||||||
smartgears=(sg !=null ) ? sg[0] : null
|
//searching smartgears-distribution version in Distribution component of defined inside the yaml file
|
||||||
println("smartgears version is ${smartgears}")
|
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
|
||||||
return
|
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