generated from gCubeCI/Pipeline-Docker-Template
managed the smartgears-distribution-legacy component just in case it is
present on release file
This commit is contained in:
parent
974a264b32
commit
951d53cef2
|
@ -362,21 +362,14 @@ def deployRelease(def categoryList, def yaml){
|
|||
for ( def category : categories){
|
||||
if("${group_name}" == "$category"){
|
||||
if (category == "${DISTRIBUTION_CATEGORY}"){
|
||||
//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"; }}
|
||||
//searching smartgears-distribution (os smartgears-distribution-legacy) version in Distribution component defined inside the yaml file
|
||||
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution' || "$it.name" == 'smartgears-distribution-legacy' ){ return "$it.version"; }}
|
||||
smartgears=(sg !=null ) ? sg[0] : ''
|
||||
}else if (category =="${PORTLET_CATEGORY}"){
|
||||
//def portlets="{\"generic_portlets\": ";
|
||||
// portlets += component_list?.collect{ return [ 'name': "$it.name", 'version': "$it.version", 'extension': 'war' ] }
|
||||
// portlets += component_list?.collect{ return " {\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "}
|
||||
portlets += component_list?.collect{ if ("${it.group_id}" != "null") return "{\"group_id\": \"$it.group_id\", \"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"} "; else return "{\"name\": \"$it.name\", \"version\": \"$it.version\", \"extension\": \"war\"}"}
|
||||
// portlets.removeAll(["\"group_id\": \"null\""]);
|
||||
echo "portlets: $portlets"
|
||||
def jsonContent= "{\"generic_portlets\": "+portlets+"}"
|
||||
echo "json: $jsonContent"
|
||||
writeJSON file: 'portlets.json', json: jsonContent
|
||||
// def read = readJSON file: 'portlets.json'
|
||||
// println("Portlets found: "+read.name+" "+read.version+ " "+read.extension)
|
||||
def output = sh(returnStdout: true, returnStdoutTrim: true, script: "mv portlets.json $ANSIBLE_ROOT_FOLDER")
|
||||
isPortlet= true
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue