Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
KOGITO-5386: added a new parameter for unique branch name (#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbiarnes committed Aug 8, 2023
1 parent c35f396 commit 1a238b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ pipeline {
}
steps {
script {
if (githubscm.isBranchExist('origin', helper.getPRBranch())) {
githubscm.removeRemoteBranch('origin', helper.getPRBranch())
}
githubscm.createBranch(helper.getPRBranch())
}
}
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 @@ -148,6 +148,7 @@ void setupDeployJob(JobType jobType, String envName = '') {
stringParam('IMAGE_NAMESPACE', "${CLOUD_IMAGE_NAMESPACE}", 'Image namespace to use to deploy images')
stringParam('IMAGE_NAME_SUFFIX', '', 'Image name suffix to use to deploy images. In case you need to change the final image name, you can add a suffix to it.')
stringParam('IMAGE_TAG', '', 'Image tag to use to deploy images')
stringParam('KOGITO_PR_BRANCH', '', 'PR branch name')
booleanParam('DEPLOY_WITH_LATEST_TAG', false, 'Set to true if you want the deployed image to also be with the `latest` tag')
booleanParam('SKIP_DEPLOY', false, 'In case you don\'t want to deploy the final image.')

Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/scripts/helper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ String getGitAuthorCredsID() {
}

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

String getProjectVersion() {
Expand Down

0 comments on commit 1a238b6

Please sign in to comment.