From 6f1f5e76a603db22b9e5b9fd3c977d1f83b3a5f9 Mon Sep 17 00:00:00 2001 From: Michael Biarnes Kiefer Date: Thu, 3 Aug 2023 15:01:26 +0200 Subject: [PATCH] KOGITO-5386: added a new parameter for unique branch name --- .ci/jenkins/Jenkinsfile.release.artifacts | 1 + .ci/jenkins/Jenkinsfile.release.cloud | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.ci/jenkins/Jenkinsfile.release.artifacts b/.ci/jenkins/Jenkinsfile.release.artifacts index 0f4827b3fb..cc52e0c0ae 100644 --- a/.ci/jenkins/Jenkinsfile.release.artifacts +++ b/.ci/jenkins/Jenkinsfile.release.artifacts @@ -355,6 +355,7 @@ List getDefaultBuildParams(String version) { List buildParams = [] addDisplayNameParam(buildParams, getDisplayName(version)) addStringParam(buildParams, 'PROJECT_VERSION', version) + addStringParam(buildParams, 'KOGITO_PR_BRANCH', "kogito-${version}") return buildParams } diff --git a/.ci/jenkins/Jenkinsfile.release.cloud b/.ci/jenkins/Jenkinsfile.release.cloud index dad1c3a1e8..7798040ebf 100644 --- a/.ci/jenkins/Jenkinsfile.release.cloud +++ b/.ci/jenkins/Jenkinsfile.release.cloud @@ -24,6 +24,8 @@ examplesImagesParamsPrefix = 'EXAMPLES_IMAGES' baseImageParamsPrefix = 'BASE_IMAGE' promoteImageParamsPrefix = 'PROMOTE_IMAGE' +kogitoPrBranch = "${KOGITO_PR_BRANCH?.trim() ?: "kogito-${version}"}" + pipeline { agent { label 'kie-rhel8 && !built-in' @@ -39,6 +41,8 @@ pipeline { KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") IMAGE_NAME_NIGHTLY_SUFFIX = 'nightly' + + PR_BRANCH_HASH = "${util.generateHash(10)}" } stages { @@ -425,6 +429,9 @@ List getDefaultBuildParams(String version) { List buildParams = [] addDisplayNameParam(buildParams, getDisplayName(version)) addStringParam(buildParams, 'PROJECT_VERSION', version) + if ( kogitoPrBranch == '' ) { + addStringParam(buildParams, 'KOGITO_PR_BRANCH', "${kogitoPrBranch}") + } return buildParams }