diff --git a/examples/with_function b/examples/with_function index 8f10237..9a544e2 100644 --- a/examples/with_function +++ b/examples/with_function @@ -1,3 +1,15 @@ +import groovy.json.JsonSlurper + +//locate where this jenkinsfile is +String releaseURL = "https://code-repo.d4science.org/gCubeCI/gCubeRelease/raw/branch/feature/17273/releases/gcube-${params.gCube_release_number}.json" +//check and parse the release file +println "Querying ${releaseURL}" +def text = releaseURL.toURL().getText() +def gcubeJSON = new JsonSlurper().parseText(text) + +//check that the release number parameter is the one expected +assert gcubeJSON["gCube.version"] == params.gCube_release_number : "Release versions do not match!" + pipeline { agent any stages { @@ -6,6 +18,11 @@ pipeline { buildComponents items: ("a".."f").collect { "Stage ${it}" } } } + stage('build2') { + steps { + buildComponents items: ("g".."fp").collect { "Stage ${it}" } + } + } } }