diff --git a/Jenkinsfile b/Jenkinsfile index 688bca2..a773c63 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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" } }