generated from gCubeCI/Pipeline-Docker-Template
fix json
This commit is contained in:
parent
12be87c118
commit
14dcf64e6d
|
@ -365,10 +365,12 @@ def deployRelease(def categoryList, def yaml){
|
||||||
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
|
def sg= component_list?.collect{ if ("$it.name" == 'smartgears-distribution'){ return "$it.version"; }}
|
||||||
smartgears=(sg !=null ) ? sg[0] : ''
|
smartgears=(sg !=null ) ? sg[0] : ''
|
||||||
}else if (category =="${PORTLET_CATEGORY}"){
|
}else if (category =="${PORTLET_CATEGORY}"){
|
||||||
portlets="\"generic_portlets\": ";
|
//def portlets="{\"generic_portlets\": ";
|
||||||
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' ] }
|
||||||
// portlets += "}"
|
def jsonContent= "{\"generic_portlets\":"+portlets+"}"
|
||||||
writeJSON file: 'portlets.json', json: portlets
|
echo "json: $json"
|
||||||
|
// portlets += "}"
|
||||||
|
writeJSON file: 'portlets.json', json: jsonContent
|
||||||
// def read = readJSON file: 'portlets.json'
|
// def read = readJSON file: 'portlets.json'
|
||||||
// println("Portlets found: "+read.name+" "+read.version+ " "+read.extension)
|
// println("Portlets found: "+read.name+" "+read.version+ " "+read.extension)
|
||||||
def output = sh(returnStdout: true, returnStdoutTrim: true, script: "mv portlets.json $ANSIBLE_ROOT_FOLDER")
|
def output = sh(returnStdout: true, returnStdoutTrim: true, script: "mv portlets.json $ANSIBLE_ROOT_FOLDER")
|
||||||
|
|
Loading…
Reference in New Issue