From 4a27427963ad9de3cbbbd9e8f56d2e0751a53daf Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Tue, 29 Aug 2017 14:47:23 -0400 Subject: Propagate branch and tag information --- jenkins/dispatch.groovy | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'jenkins/dispatch.groovy') diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index fcf67d3..fcad873 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -64,6 +64,12 @@ node(LABEL) { // Get the manifest and build control files git branch: BUILD_CONTROL_BRANCH, url: BUILD_CONTROL_REPO + // If a tag was specified in the job-suite-generator configuration, + // explicitly check out that tag after cloning the (master) branch, + // since the 'git' pipeline step does not yet support accessing tags. + if (BUILD_CONTROL_TAG != "") { + sh(script: "git checkout tags/${BUILD_CONTROL_TAG}") + } this.manifest = readYaml file: "manifests/${MANIFEST_FILE}" if (this.manifest.channel_URL[-1..-1] == "/") { -- cgit