Skip to content

Commit

Permalink
KOGITO-5386: added a new parameter for unique branch name (#1820)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbiarnes committed Aug 8, 2023
1 parent 1faabec commit 6623ccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ pipeline {
}
steps {
dir(getRepoName()) {
if (githubscm.isBranchExist('origin',getPRBranch())) {
githubscm.removeRemoteBranch('origin', getPRBranch())
}
githubscm.createBranch(getPRBranch())
}
}
Expand Down Expand Up @@ -265,7 +268,7 @@ String getProjectVersion() {
}

String getPRBranch() {
return "${getProjectVersion()}-${env.PR_BRANCH_HASH}"
return params.KOGITO_PR_BRANCH
}

void setDeployPropertyIfNeeded(String key, def value) {
Expand Down
1 change: 1 addition & 0 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void setupDeployJob(JobType jobType, String envName = '') {

booleanParam('CREATE_PR', false, 'Should we create a PR with the changes ?')
stringParam('PROJECT_VERSION', '', 'Optional if not RELEASE. If RELEASE, cannot be empty.')
stringParam('KOGITO_PR_BRANCH', '', 'PR branch name')

booleanParam('SEND_NOTIFICATION', false, 'In case you want the pipeline to send a notification on CI channel for this run.')
}
Expand Down

0 comments on commit 6623ccb

Please sign in to comment.