From d2f0a1d414af9fb8ab25b2f82e4f30b3e94cdcd0 Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Sun, 1 Sep 2019 22:34:58 -0400 Subject: [PATCH] Add a second stage to functions. --- examples/with_function | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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}" } + } + } } }