This is an automated email from the ASF dual-hosted git repository.
tiagobento pushed a commit to branch 10.0.x
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-images.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new 6513ba1c [10.0.x] isolate pr checks between branches (#1784)
6513ba1c is described below
commit 6513ba1cec8edc42c86e7542f42155d2664036a0
Author: Jan Stastny <[email protected]>
AuthorDate: Tue Jul 23 01:18:15 2024 +0200
[10.0.x] isolate pr checks between branches (#1784)
---
.ci/jenkins/{Jenkinsfile => Jenkinsfile.pr.10.0.x} | 0
.ci/jenkins/Jenkinsfile.setup-branch | 8 +++++++-
.ci/jenkins/dsl/jobs.groovy | 3 ++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile.pr.10.0.x
similarity index 100%
rename from .ci/jenkins/Jenkinsfile
rename to .ci/jenkins/Jenkinsfile.pr.10.0.x
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch
b/.ci/jenkins/Jenkinsfile.setup-branch
index ade24b15..e6d5b102 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -103,8 +103,14 @@ pipeline {
steps {
script {
dir(getRepoName()) {
+
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
+ def mainBranchPrCheckJenkinsfile =
'.ci/jenkins/Jenkinsfile'
+ def newBranchPrCheckJenkinsfile =
".ci/jenkins/Jenkinsfile.pr.${getBuildBranch()}"
+ if (!isMainBranch() &&
fileExists(mainBranchPrCheckJenkinsfile)) {
+ sh "mv ${mainBranchPrCheckJenkinsfile}
${newBranchPrCheckJenkinsfile}"
+ sh "git add ${newBranchPrCheckJenkinsfile}"
+ }
if (githubscm.isThereAnyChanges()) {
-
githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId())
githubscm.commitChanges("[${getBuildBranch()}]
Update version to ${getKogitoVersion()}")
githubscm.pushObject('origin', getBuildBranch(),
getGitAuthorPushCredsId())
} else {
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index 77347e0c..60680558 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -64,7 +64,8 @@ void setupPrJob() {
setupBuildAndTestJob(JobType.PULL_REQUEST)
// Branch Source Plugin multibranchPipelineJob
- Utils.isMainBranch(this) &&
KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this,
"${jenkins_path}/Jenkinsfile", JobType.PULL_REQUEST.getName())
+ def triggeringJenkinsfileName = Utils.isMainBranch(this) ? "Jenkinsfile" :
"Jenkinsfile.pr.${Utils.getGitBranch(this)}"
+ KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this,
"${jenkins_path}/${triggeringJenkinsfileName}", JobType.PULL_REQUEST.getName())
}
void createSetupBranchJob() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]