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 3, 2023
1 parent 5828d30 commit c3e750f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ pipeline {
steps {
script {
dir(getRepoName()) {
if (githubscm.isBranchExist('origin',getPRBranch())) {
githubscm.removeRemoteBranch('origin', getPRBranch())
}
githubscm.createBranch(getPRBranch())
}
}
Expand Down Expand Up @@ -278,7 +281,7 @@ String getDroolsVersion() {
}

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

void setDeployPropertyIfNeeded(String key, def value) {
Expand Down
3 changes: 2 additions & 1 deletion .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void setupDeployJob(JobType jobType, String envName = '') {

AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}",

MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}",
MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}",
Expand Down Expand Up @@ -212,6 +212,7 @@ void setupDeployJob(JobType jobType, String envName = '') {
booleanParam('CREATE_PR', false, 'Should we create a PR with the changes ?')
stringParam('PROJECT_VERSION', '', 'Set the project version')
stringParam('DROOLS_VERSION', '', 'Drools version to set')
stringParam('KOGITO_RELEASE_BRANCH', '', 'release 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 c3e750f

Please sign in to comment.