93 lines
No EOL
2.9 KiB
Groovy
93 lines
No EOL
2.9 KiB
Groovy
def verticalstackinfostore = null
|
|
|
|
/* Example expected JSON
|
|
{
|
|
"COMPONENTS" : {
|
|
"ATLAS_UI": {
|
|
"ARTIFACT_LOCATION": "Release repository",
|
|
"BUILD_JOB": "Atlas_3.0.9/Atlas_3.0.9_build",
|
|
"BUILD_JOB_SELECTOR": "<stable>true</stable>",
|
|
"RELEASE_REPO": "git@hydra:atlas-ui-releases/atlas_ui_whole.git",
|
|
"RELEASE_REVISION": "refs/tags/3.0.9.52395_53"
|
|
},
|
|
"ATLAS_SERVICES": {
|
|
"ARTIFACT_LOCATION": "Release repository",
|
|
"BUILD_JOB": "MCS_1.0.9/MCS_1.0.9_build",
|
|
"BUILD_JOB_SELECTOR": "<stable>true</stable>",
|
|
"RELEASE_REPO": "git@hydra:atlas-services-releases/atlas_services_whole.git",
|
|
"RELEASE_REVISION": "refs/tags/1.0.3.1292_54"
|
|
},
|
|
"PDF_RENDER_SERVER": {
|
|
"ARTIFACT_LOCATION": "Release repository",
|
|
"BUILD_JOB": "PDF_Render_Server_1.0.3/PDF_Render_Server_1.0.3_build",
|
|
"BUILD_JOB_SELECTOR": "<stable>true</stable>",
|
|
"RELEASE_REPO": "git@hydra:pdf-render-server-releases/pdf_render_server_whole.git",
|
|
"RELEASE_REVISION": "refs/tags/1.0.3.1292_54"
|
|
},
|
|
"HEAD_MANAGER_BOARD": {
|
|
"ARTIFACT_LOCATION": "Release repository",
|
|
"BUILD_JOB": "HMB_SE_D3000_0.9.13/HMB_SE_D3000_0.9.13_build",
|
|
"BUILD_JOB_SELECTOR": "<stable>true</stable>",
|
|
"RELEASE_REPO": "git@hydra:hmb_se_d3000-releases/hmb_se_d3000_whole.git",
|
|
"RELEASE_REVISION": "refs/tags/0.9.9.8897_2"
|
|
},
|
|
"SYSTEM_MANAGER": {
|
|
"ARTIFACT_LOCATION": "Release repository",
|
|
"BUILD_JOB": "SM200_1.1.0/SM200_1.1.0_build",
|
|
"BUILD_JOB_SELECTOR": "<stable>true</stable>",
|
|
"RELEASE_REPO": "git@hydra:sm200-releases/sm200_whole.git",
|
|
"RELEASE_REVISION": "refs/tags/1.0.6.31386_8"
|
|
},
|
|
"INK_MANAGER_BOARD": {
|
|
"ARTIFACT_LOCATION": "Release repository",
|
|
"BUILD_JOB": "IMB_1.5.18/IMB_1.5.18_build",
|
|
"BUILD_JOB_SELECTOR": "<stable>true</stable>",
|
|
"RELEASE_REPO": "git@hydra:imb-releases/imb_whole.git",
|
|
"RELEASE_REVISION": "refs/tags/1.5.18.21422_40"
|
|
}
|
|
},
|
|
"USE_ATLAS_SERVICES_BUILT_WITH_ATLAS_UI": true
|
|
}
|
|
*/
|
|
|
|
def String asJsonText() {
|
|
return writeJSON(returnText: true, json: verticalstackinfostore, pretty: 1)
|
|
}
|
|
|
|
def boolean exists() {
|
|
return (verticalstackinfostore != null)
|
|
}
|
|
|
|
def set(String jsontext) {
|
|
verticalstackinfostore = readJSON(text: jsontext)
|
|
echo "Vertical stack info:\n${asJsonText()}"
|
|
}
|
|
|
|
def get() {
|
|
return verticalstackinfostore
|
|
}
|
|
|
|
def namedartifactinfo(componentname) {
|
|
return verticalstackinfostore['COMPONENTS'][componentname]
|
|
}
|
|
|
|
def String artifactlocation(namedartifactinfo) {
|
|
return namedartifactinfo['ARTIFACT_LOCATION']
|
|
}
|
|
|
|
def source(importoptions, namedartifactinfo) {
|
|
importoptions.source(
|
|
artifactlocation(namedartifactinfo),
|
|
namedartifactinfo['BUILD_JOB'],
|
|
namedartifactinfo['BUILD_JOB_SELECTOR'],
|
|
namedartifactinfo['RELEASE_REPO'],
|
|
namedartifactinfo['RELEASE_REVISION']
|
|
)
|
|
}
|
|
|
|
def boolean useAtlasServicesBuiltWithAtlasUI() {
|
|
return verticalstackinfostore['USE_ATLAS_SERVICES_BUILT_WITH_ATLAS_UI']
|
|
}
|
|
|
|
|
|
return this |