generated from gCubeCI/Pipeline-Docker-Template
add RELEASE_URL input parameter
This commit is contained in:
parent
43a402ab16
commit
bcff06a388
|
@ -10,10 +10,16 @@
|
||||||
|
|
||||||
def agent_root_folder = '/var/lib/jenkins'
|
def agent_root_folder = '/var/lib/jenkins'
|
||||||
|
|
||||||
if ("${params.gCube_release_version}"){
|
if ("${params.gCube_release_version}" || "${params.RELEASE_URL}"){
|
||||||
//locate the release file
|
String releaseURL='';
|
||||||
String releaseURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleases/raw/branch/master/open/gcube-${gCube_release_version}.yaml"
|
if ("${params.gCube_release_version}"){
|
||||||
//load the release file
|
//locate the release file
|
||||||
|
releaseURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleases/raw/branch/master/open/gcube-${gCube_release_version}.yaml"
|
||||||
|
}else{
|
||||||
|
releaseURL = "${params.RELEASE_URL}"
|
||||||
|
}
|
||||||
|
|
||||||
|
//load the release file
|
||||||
def text = releaseURL.toURL().getText()
|
def text = releaseURL.toURL().getText()
|
||||||
//parsing
|
//parsing
|
||||||
def jsonConfig = new Yaml().load(text)
|
def jsonConfig = new Yaml().load(text)
|
||||||
|
@ -30,10 +36,6 @@ if ("${params.gCube_release_version}"){
|
||||||
|
|
||||||
def deployList
|
def deployList
|
||||||
def backupList
|
def backupList
|
||||||
if (params.deployFile) {
|
|
||||||
println "Using custom deploy file"
|
|
||||||
deployList = params.deployFile
|
|
||||||
}
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
|
@ -73,7 +75,8 @@ pipeline {
|
||||||
DEPLOY_CATEGORY="${env.DEPLOY_CATEGORY}"
|
DEPLOY_CATEGORY="${env.DEPLOY_CATEGORY}"
|
||||||
//Job name of the release pipeline
|
//Job name of the release pipeline
|
||||||
RELEASE_JOB='gCubeBuilder'
|
RELEASE_JOB='gCubeBuilder'
|
||||||
|
//URL to the YAML file. Used alternatively to RELEASE_JOB
|
||||||
|
RELEASE_URL= "${params.RELEASE_URL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
|
@ -95,10 +98,13 @@ pipeline {
|
||||||
string(name: 'report_number',
|
string(name: 'report_number',
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
description: 'The build report number on Git to pull the notes. Leave blank if executed outside gCube release.')
|
description: 'The build report number on Git to pull the notes. Leave blank if executed outside gCube release.')
|
||||||
|
string(name: 'RELEASE_URL',
|
||||||
string(name: 'report',
|
|
||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
description: 'The build report. Leave blank to pull the build report from Git. Leave blank if executed outside gCube release.')
|
description: 'URL to the yaml file. Leave blank if executed outside gCube release.')
|
||||||
|
|
||||||
|
// string(name: 'report',
|
||||||
|
// defaultValue: '',
|
||||||
|
// description: 'The build report. Leave blank to pull the build report from Git. Leave blank if executed outside gCube release.')
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue