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'
|
||||
|
||||
if ("${params.gCube_release_version}"){
|
||||
//locate the release file
|
||||
String releaseURL = "https://code-repo.d4science.org/gCubeCI/gCubeReleases/raw/branch/master/open/gcube-${gCube_release_version}.yaml"
|
||||
//load the release file
|
||||
if ("${params.gCube_release_version}" || "${params.RELEASE_URL}"){
|
||||
String releaseURL='';
|
||||
if ("${params.gCube_release_version}"){
|
||||
//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()
|
||||
//parsing
|
||||
def jsonConfig = new Yaml().load(text)
|
||||
|
@ -30,10 +36,6 @@ if ("${params.gCube_release_version}"){
|
|||
|
||||
def deployList
|
||||
def backupList
|
||||
if (params.deployFile) {
|
||||
println "Using custom deploy file"
|
||||
deployList = params.deployFile
|
||||
}
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
@ -73,7 +75,8 @@ pipeline {
|
|||
DEPLOY_CATEGORY="${env.DEPLOY_CATEGORY}"
|
||||
//Job name of the release pipeline
|
||||
RELEASE_JOB='gCubeBuilder'
|
||||
|
||||
//URL to the YAML file. Used alternatively to RELEASE_JOB
|
||||
RELEASE_URL= "${params.RELEASE_URL}"
|
||||
}
|
||||
|
||||
parameters {
|
||||
|
@ -95,10 +98,13 @@ pipeline {
|
|||
string(name: 'report_number',
|
||||
defaultValue: '',
|
||||
description: 'The build report number on Git to pull the notes. Leave blank if executed outside gCube release.')
|
||||
|
||||
string(name: 'report',
|
||||
string(name: 'RELEASE_URL',
|
||||
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