Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOGITO-9671 CI: Remove bot account usage #5434

Merged
merged 1 commit into from
Aug 2, 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
8 changes: 2 additions & 6 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pipeline {
steps {
script {
dir(getRepoName()) {
prepareForPR()
githubscm.createBranch(getPRBranch())
}
}
}
Expand Down Expand Up @@ -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())
lampajr marked this conversation as resolved.
Show resolved Hide resolved
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.uri", "https://github.com/${getGitAuthor()}/${getRepoName()}")
setDeployPropertyIfNeeded("${getRepoName()}.pr.target.ref", getBuildBranch())
}
Expand Down Expand Up @@ -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."
Expand Down
8 changes: 2 additions & 6 deletions .ci/jenkins/Jenkinsfile.promote
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ pipeline {
steps {
script {
dir('pr') {
prepareForPR()
checkoutRepo()
githubscm.createBranch(getSnapshotBranch())

maven.mvnVersionsSet(getMavenCommand(), getSnapshotVersion(), true)

Expand Down Expand Up @@ -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."
Expand Down
3 changes: 0 additions & 3 deletions .ci/jenkins/config/branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .ci/jenkins/project/Jenkinsfile.post-release
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand Down