Skip to content

Commit

Permalink
kie-issues#767: set user config for git (#1146)
Browse files Browse the repository at this point in the history
Co-authored-by: jstastny-cz <[email protected]>
  • Loading branch information
jstastny-cz and jstastny-cz authored Dec 14, 2023
1 parent ab1316a commit da78095
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions dsl/seed/jenkinsfiles/Jenkinsfile.remove.branches
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ void sendErrorNotification() {

String commitAndCreatePR(String commitMsg, String localBranch, String targetBranch) {
def prBody = "Generated by ${BUILD_URL}"
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg)
githubscm.pushObject('origin', localBranch, getGitAuthorPushCredsId())
return githubscm.createPR(commitMsg, prBody, targetBranch, getGitAuthorCredsId())
Expand Down
1 change: 1 addition & 0 deletions dsl/seed/jenkinsfiles/Jenkinsfile.tools.toggle-triggers
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pipeline {
if (githubscm.isThereAnyChanges()) {
String commitMsg = "[${getSeedConfigBranch()}] DSL triggers ${DISABLE_TRIGGERS ? 'disabled' : 'enabled'}"
githubscm.createBranch(getPRBranch())
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg)
githubscm.pushObject('origin', getPRBranch(), getSeedConfigAuthorPushCredsId())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ pipeline {
dir(getRepoName()) {
if (githubscm.isThereAnyChanges()) {
String commitMsg = "[${getBuildBranch()}] ${getJiraNumber() ? "[${getJiraNumber()}] " : ''}Bump ${getDependencyName()} version to ${getNewVersion()}"
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg)
githubscm.pushObject('origin', getPRBranch(), getGitAuthorPushCredsId())

Expand Down
1 change: 1 addition & 0 deletions dsl/seed/jenkinsfiles/Jenkinsfile.update-quarkus-platform
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pipeline {
def prBody = "Generated by Kogito pipelines"

if (githubscm.isThereAnyChanges()) {
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg, { sh "git add --all" })
githubscm.pushObject('origin', localBranch, "${getGitForkAuthorPushCredsId()}")
if (branchCreated) {
Expand Down
1 change: 1 addition & 0 deletions dsl/seed/jenkinsfiles/Jenkinsfile.update-quarkus-version
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pipeline {

if (githubscm.isThereAnyChanges()) {
String commitMsg = "[${getSeedConfigFileGitBranch()}] ${getJiraNumber() ? "[${getJiraNumber()}] " : ''}Bump quarkus version to ${getNewVersion()}"
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg)
githubscm.pushObject('origin', prBranch, "${getSeedConfigFileGitAuthorPushCredsId()}")

Expand Down

0 comments on commit da78095

Please sign in to comment.