First attempt to read the configuration from a JSON file. Add a sample JSON release for testing purposes.
This commit is contained in:
parent
a261f8fec5
commit
0e2df958e1
|
@ -1,3 +1,10 @@
|
|||
import groovy.json.JsonSlurper
|
||||
|
||||
def inputFile = new File(".\releases\gcube-${params.gCube_release_number}.json")
|
||||
def gcubeJSON = new JsonSlurper().parseText(inputFile)
|
||||
//check that the release number parameter is the one expected
|
||||
assert gcubeJSON["gCube.version"] == params.gCube_release_number : "Release versions do not match!"
|
||||
|
||||
|
||||
// set the build options according to the Type of build
|
||||
def (options,maven_local_repo_path,maven_settings_file) = ['','','']
|
||||
|
@ -40,9 +47,8 @@ echo "Use settings file at ${maven_settings_file}"
|
|||
echo "Use local repo at ${maven_local_repo_path}"
|
||||
echo "Release number: ${params.gCube_release_number}"
|
||||
|
||||
def apps = ['SmartGears':['maven-parent', 'gcube-bom', 'gxRest'],
|
||||
'Enabling':['job4', 'job5', 'job6'],
|
||||
'Data':['job7', 'job8', 'job9']]
|
||||
def apps = gcubeJSON['Components']
|
||||
|
||||
def dynamicStages = [:]
|
||||
|
||||
//let's build the stages closures
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"gCube.version": "4.14.5",
|
||||
"Components": {
|
||||
"SmartGear": [
|
||||
"maven-parent",
|
||||
"gcube-bom",
|
||||
"maven-smartgears-bom",
|
||||
"authorization-client",
|
||||
"gxRest"
|
||||
],
|
||||
"Enabling": [
|
||||
"information-system-bom",
|
||||
"information-system-model",
|
||||
"resource-registry-api",
|
||||
"resource-registry-client"
|
||||
],
|
||||
"Data": [
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue