try to set more than one yaml section on env var DEPLOY_CATEGORY

This commit is contained in:
Roberto Cirillo 2022-10-12 10:20:56 +02:00
parent fcfd5804dd
commit de1e8cfd01
1 changed files with 8 additions and 3 deletions

11
Jenkinsfile vendored
View File

@ -217,15 +217,20 @@ pipeline {
} }
steps { steps {
script{ script{
if("${DEPLOY_CATEGORY}"){
println("Going to deploy the Release components") println("Going to deploy the Release components")
def releaseList = [] def releaseList = []
def categories="${DEPLOY_CATEGORY}".split(',')
jsonConfig.gCube_release.Components.each { group_name, component_list -> jsonConfig.gCube_release.Components.each { group_name, component_list ->
if("${group_name}" == "${DEPLOY_CATEGORY}"){ for ( def category ; categories){
releaseList += component_list?.collect {return "$it.name,$it.version" } if("${group_name}" == "${DEPLOY_CATEGORY}"){
println("found ${releaseList}"); releaseList += component_list?.collect {return "$it.name,$it.version" }
println("found ${releaseList}");
}
} }
} }
deployReleaseJobs(releaseList); deployReleaseJobs(releaseList);
}
} }
} }
} }