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

KOGITO-5386: added a new parameter for unique branch name #1504

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading