add check on release components

This commit is contained in:
Roberto Cirillo 2023-06-14 14:59:34 +02:00
parent 195ad81f65
commit 7f786fbbe7
1 changed files with 23 additions and 14 deletions

11
Jenkinsfile vendored
View File

@ -349,6 +349,7 @@ def deployJobs(def serviceList){
}
//Deploy only release components. All the component are passed as: componentName,componentVersion
def deployReleaseJobs(def serviceList, String smartgears){
if (serviceList){
println("Going to deploy release components");
for (def record : serviceList) {
service=record.split(",");
@ -363,10 +364,18 @@ def deployReleaseJobs(def serviceList, String smartgears){
}
}
}
}else{
println("Release components not found. Skip this stage");
}
}
// collects all the components defined inside one or more yaml categories matching categoryList
def deployRelease(def categoryList, def yaml){
def releaseList = []
def portlets
String smartgears
def categories=categoryList.split(',')
yaml.gCube_release.Components.each { group_name, component_list ->
@ -378,7 +387,7 @@ def deployRelease(def categoryList, def yaml){
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
smartgears=(sg !=null ) ? sg[0] : ''
}else if (category =="${PORTLET_CATEGORY}"){
def portlets=component_list?.collect{ return [ 'name': "$it.name", 'version': "$it.version", 'extension': war ] }
portlets += component_list?.collect{ return [ 'name': "$it.name", 'version': "$it.version", 'extension': war ] }
writeJSON file: 'portlets.json', json: portlets
def read = readJSON file: 'portlets.json'
println("Portlets found: "+read.name+" "+read.version+ " "+read.extension)