From 0bbfe24aec129b1ba9e508db97ce9d54a1ba56b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 28 Aug 2018 15:01:30 -0400 Subject: [PATCH] make sure we don't pass origin/ with branch name to child jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ci/common.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/common.groovy b/ci/common.groovy index 27bdc7a532..51eb65c8e4 100644 --- a/ci/common.groovy +++ b/ci/common.groovy @@ -3,12 +3,14 @@ def version() { } def buildBranch(name = null, buildType = params.BUILD_TYPE) { + /* need to drop origin/ to match definitions of child jobs */ + def branchName = env.GIT_BRANCH.replace('origin/', '') /* always pass the BRANCH and BUILD_TYPE params with current branch */ return build( job: name, parameters: [ - [name: 'BRANCH', value: env.GIT_BRANCH, $class: 'StringParameterValue'], - [name: 'BUILD_TYPE', value: buildType, $class: 'StringParameterValue'], + [name: 'BRANCH', value: branchName, $class: 'StringParameterValue'], + [name: 'BUILD_TYPE', value: buildType, $class: 'StringParameterValue'], ]) }