31 lines
No EOL
703 B
Groovy
31 lines
No EOL
703 B
Groovy
def somsoftwareinfostore = null
|
|
|
|
/* Example expected JSON
|
|
{
|
|
"Artifact info": {
|
|
"Location": "Jenkins job artifact",
|
|
"Job": "SOM_GIS_master/SOM_GIS_master_build",
|
|
"Job selector": "<stable>true</stable>",
|
|
"Release repo": "git@hydra:som_gis-releases/som_gis_whole.git",
|
|
"Release repo revision": ""
|
|
}
|
|
}*/
|
|
|
|
def String asJsonText() {
|
|
return writeJSON(returnText: true, json: somsoftwareinfostore, pretty: 1)
|
|
}
|
|
|
|
def boolean exists() {
|
|
return (somsoftwareinfostore != null)
|
|
}
|
|
|
|
def set(String jsontext) {
|
|
somsoftwareinfostore = readJSON(text: jsontext)
|
|
echo "Som software support info:\n${asJsonText()}"
|
|
}
|
|
|
|
def get() {
|
|
return somsoftwareinfostore
|
|
}
|
|
|
|
return this |