add condition on Portlet category related to Release deployment

This commit is contained in:
Roberto Cirillo 2023-06-14 10:51:01 +02:00
parent 942176c290
commit 195ad81f65
1 changed files with 7 additions and 0 deletions

7
Jenkinsfile vendored
View File

@ -82,6 +82,8 @@ pipeline {
RELEASE_MANAGER_USER='roberto.cirillo'
// name of Smartgears distribution group, defined in the yaml file ( only for release deployments)
DISTRIBUTION_CATEGORY='Distribution'
// name of Portlets group, defined in the yaml file ( only for release deployments)
PORTLET_CATEGORY='Portlets'
}
parameters {
@ -375,6 +377,11 @@ def deployRelease(def categoryList, def yaml){
//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] : ''
}else if (category =="${PORTLET_CATEGORY}"){
def 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)
}else{
releaseList += component_list?.collect {return "$it.name,$it.version" }
}