This is an automated email from the ASF dual-hosted git repository.
jstastnycz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-optaplanner.git
The following commit(s) were added to refs/heads/main by this push:
new 125f57b503 kie-issues#767: set user config for git
125f57b503 is described below
commit 125f57b503b6fa332748918309f6e85edd58aa99
Author: jstastny-cz <[email protected]>
AuthorDate: Thu Dec 14 11:42:14 2023 +0100
kie-issues#767: set user config for git
---
.ci/jenkins/Jenkinsfile.deploy | 2 +-
.ci/jenkins/Jenkinsfile.setup-branch | 3 ++-
.ci/jenkins/project/Jenkinsfile.post-release | 5 +++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index c7a708b7e9..68836264ac 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -359,7 +359,7 @@ void commitAndCreatePR(String folder, String repo, String
buildBranch) {
} else {
prBody += '\nPlease review and merge.'
}
-
+ githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg, {
githubscm.findAndStageNotIgnoredFiles('pom.xml')
githubscm.findAndStageNotIgnoredFiles('build.gradle')
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch
b/.ci/jenkins/Jenkinsfile.setup-branch
index f23de513a8..bf22254755 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -58,7 +58,7 @@ pipeline {
dir(getRepoName()) {
if (githubscm.isThereAnyChanges()) {
def commitMsg = "Update version to
${getOptaPlannerVersion()}"
-
+
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg, {
githubscm.findAndStageNotIgnoredFiles('pom.xml')
githubscm.findAndStageNotIgnoredFiles('antora.yml')
@@ -147,6 +147,7 @@ boolean isMainBranch() {
String commitAndCreatePR(String commitMsg, String localBranch, String
targetBranch) {
def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}"
+ githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg)
githubscm.pushObject('origin', localBranch, getGitAuthorPushCredsId())
return githubscm.createPR(commitMsg, prBody, targetBranch,
getGitAuthorCredsId())
diff --git a/.ci/jenkins/project/Jenkinsfile.post-release
b/.ci/jenkins/project/Jenkinsfile.post-release
index 77363329dc..01cb7e4caf 100644
--- a/.ci/jenkins/project/Jenkinsfile.post-release
+++ b/.ci/jenkins/project/Jenkinsfile.post-release
@@ -217,13 +217,14 @@ void mergeAndPush(String prLink, String targetBranch) {
String commitAndCreatePR(String commitMsg, Closure precommit, String
localBranch, String targetBranch) {
def prBody = "Generated by build ${BUILD_TAG}: ${BUILD_URL}"
-
+ githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges(commitMsg, precommit)
githubscm.pushObject('origin', localBranch, getGitAuthorPushCredsId())
return githubscm.createPR(commitMsg, prBody, targetBranch,
getGitAuthorCredsId())
}
void commitAndForcePushBranch(String repo, String branch) {
+ githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges("[${getBuildBranch()}] Update ${branch} to
${getProjectVersion()}", {
githubscm.findAndStageNotIgnoredFiles('pom.xml')
githubscm.findAndStageNotIgnoredFiles('build.gradle')
@@ -272,7 +273,7 @@ void removeJbossNexusFromMavenAndGradle() {
}
def forcePushBranch(String branch) {
- withCredentials([usernamePassword(credentialsId: getGitAuthorCredsId(),
usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) {
+ withCredentials([usernamePassword(credentialsId:
getGitAuthorPushCredsId(), usernameVariable: 'GIT_USERNAME', passwordVariable:
'GIT_PASSWORD')]) {
// Please leave the double-quote here. They are mandatory for the
shell command to work correctly.
sh """
git config --local credential.helper \"!f() { echo
username=\\$GIT_USERNAME; echo password=\\$GIT_PASSWORD; }; f\"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]