You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by po...@apache.org on 2023/09/18 16:15:57 UTC
[incubator-kie-kogito-pipelines] branch apache_migration updated: set branch evn variables for PR check Jenkinsfile (#1087)
This is an automated email from the ASF dual-hosted git repository.
porcelli pushed a commit to branch apache_migration
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-pipelines.git
The following commit(s) were added to refs/heads/apache_migration by this push:
new 2fd3249a set branch evn variables for PR check Jenkinsfile (#1087)
2fd3249a is described below
commit 2fd3249afa74331b84b0b5da020160c410038f66
Author: Jan Stastny <st...@gmail.com>
AuthorDate: Mon Sep 18 18:15:52 2023 +0200
set branch evn variables for PR check Jenkinsfile (#1087)
Co-authored-by: jstastny-cz <ja...@ibm.com>
---
dsl/scripts/pr_check.groovy | 2 +-
.../src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dsl/scripts/pr_check.groovy b/dsl/scripts/pr_check.groovy
index ea74d7ab..78c3fe84 100644
--- a/dsl/scripts/pr_check.groovy
+++ b/dsl/scripts/pr_check.groovy
@@ -91,7 +91,7 @@ String getBuildChainCommandline() {
// Those can be overriden in Jenkinsfiles
String buildChainProject = env.BUILDCHAIN_PROJECT ?: CHANGE_REPO
String buildChainConfigRepo = env.BUILDCHAIN_CONFIG_REPO ?: 'incubator-kie-kogito-pipelines'
- String buildChainConfigBranch = env.BUILDCHAIN_CONFIG_BRANCH ?: '\${BRANCH:main}'
+ String buildChainConfigBranch = env.BUILDCHAIN_CONFIG_BRANCH ?: '\${GENERATION_BRANCH:main}'
String buildChainConfigGitAuthor = env.BUILDCHAIN_CONFIG_AUTHOR ?: '\${AUTHOR:apache}'
String buildChainConfigDefinitionFilePath = env.BUILDCHAIN_CONFIG_FILE_PATH ?: '.ci/pull-request-config.yaml'
diff --git a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy
index 019c8c2f..b8417aac 100644
--- a/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy
+++ b/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl/KogitoJobTemplate.groovy
@@ -502,6 +502,11 @@ class KogitoJobTemplate {
buildOriginPRMerge(true)
}
}
+ properties { """
+BRANCH=${Utils.getGitMainBranch(script)}
+GENERATION_BRANCH=${Utils.getGenerationBranch(script)}
+"""
+ }
orphanedItemStrategy {
discardOldItems {
daysToKeep(10)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org