diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index af6b1602e6f..2a44aa90b4d 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -82,7 +82,7 @@ pipeline { steps { script { dir(getRepoName()) { - prepareForPR() + githubscm.createBranch(getPRBranch()) } } } @@ -162,7 +162,7 @@ pipeline { success { script { setDeployPropertyIfNeeded("${getRepoName()}.pr.source.uri", "https://github.com/${getGitAuthor()}/${getRepoName()}") - setDeployPropertyIfNeeded("${getRepoName()}.pr.source.ref", getBuildBranch()) + setDeployPropertyIfNeeded("${getRepoName()}.pr.source.ref", getPRBranch()) setDeployPropertyIfNeeded("${getRepoName()}.pr.target.uri", "https://github.com/${getGitAuthor()}/${getRepoName()}") setDeployPropertyIfNeeded("${getRepoName()}.pr.target.ref", getBuildBranch()) } @@ -200,10 +200,6 @@ void checkoutRepo() { sh "git checkout ${getBuildBranch()}" } -void prepareForPR() { - githubscm.createBranch(getPRBranch()) -} - void commitAndCreatePR() { def commitMsg = "[${getBuildBranch()}] Update version to ${getProjectVersion()}" def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}.\nPlease do not merge, it should be merged automatically." diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 8a8302f60ed..db15d29af7d 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -87,7 +87,8 @@ pipeline { steps { script { dir('pr') { - prepareForPR() + checkoutRepo() + githubscm.createBranch(getSnapshotBranch()) maven.mvnVersionsSet(getMavenCommand(), getSnapshotVersion(), true) @@ -242,11 +243,6 @@ void tagLatest() { } } -void prepareForPR() { - checkoutRepo() - githubscm.createBranch(getSnapshotBranch()) -} - void commitAndCreatePR() { def commitMsg = "[${getBuildBranch()}] Update project version to ${getSnapshotVersion()}" def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}.\nPlease do not merge, it should be merged automatically." diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index c0804cf39e1..d4d8be13287 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -66,9 +66,6 @@ git: name: kiegroup credentials_id: kie-ci4 token_credentials_id: kie-ci4-token - bot_author: - name: bsig-gh-bot - credentials_id: bsig-gh-bot fork_author: name: kie-ci credentials_id: kie-ci diff --git a/.ci/jenkins/project/Jenkinsfile.post-release b/.ci/jenkins/project/Jenkinsfile.post-release index 3b95e732e97..6784c4f1cb9 100644 --- a/.ci/jenkins/project/Jenkinsfile.post-release +++ b/.ci/jenkins/project/Jenkinsfile.post-release @@ -30,7 +30,7 @@ pipeline { DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") - BOT_BRANCH_HASH = "${util.generateHash(10)}" + PR_BRANCH_HASH = "${util.generateHash(10)}" } stages { @@ -46,7 +46,7 @@ pipeline { script { String droolsWebsiteRepository = 'drools-website' String prLink = null - String prBranchName = "${getProjectVersion().toLowerCase()}-${env.BOT_BRANCH_HASH}" + String prBranchName = "${getProjectVersion().toLowerCase()}-${env.PR_BRANCH_HASH}" dir(droolsWebsiteRepository) { checkoutRepo(droolsWebsiteRepository, getBuildBranch()) // there is no other branch githubscm.createBranch(prBranchName)