generated from gCubeCI/Pipeline-Docker-Template
moving jsonConfig decalration outside the if
This commit is contained in:
parent
74df921160
commit
9c6e18204f
|
@ -11,6 +11,8 @@ import org.yaml.snakeyaml.Yaml
|
|||
|
||||
def agent_root_folder = '/var/lib/jenkins'
|
||||
def verbose = true
|
||||
def jsonConfig
|
||||
def text
|
||||
if ("${params.gCube_release_version}" || "${params.RELEASE_URL}"){
|
||||
String releaseURL='';
|
||||
if ("${params.gCube_release_version}"){
|
||||
|
@ -21,9 +23,9 @@ if ("${params.gCube_release_version}" || "${params.RELEASE_URL}"){
|
|||
}
|
||||
|
||||
//load the release file
|
||||
def text = releaseURL.toURL().getText()
|
||||
text = releaseURL.toURL().getText()
|
||||
//parsing
|
||||
def jsonConfig = new Yaml().load(text)
|
||||
jsonConfig = new Yaml().load(text)
|
||||
if (verbose)
|
||||
println jsonConfig.inspect()
|
||||
echo "Building gCube v. ${jsonConfig.gCube_release.Version}"
|
||||
|
|
Loading…
Reference in New Issue