Skip to content

Commit

Permalink
KOGITO-5386: added a new parameter for unique branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
mbiarnes committed Aug 8, 2023
1 parent cce9bca commit 6f1f5e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ci/jenkins/Jenkinsfile.release.artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
7 changes: 7 additions & 0 deletions .ci/jenkins/Jenkinsfile.release.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 6f1f5e7

Please sign in to comment.