This is an automated email from the ASF dual-hosted git repository.
kbowers pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git
The following commit(s) were added to refs/heads/main by this push:
new c9b8b9616c kie-issues#2119: Port CI related changes for 10.1.0 back to
main branch (#6507)
c9b8b9616c is described below
commit c9b8b9616c8244a80ffd4ebd7b6aa2554bbab0cc
Author: Kbowers <[email protected]>
AuthorDate: Thu Dec 18 19:21:10 2025 +0100
kie-issues#2119: Port CI related changes for 10.1.0 back to main branch
(#6507)
* Setup DSL branch config after cut-off
Signed-off-by: Jason Porter <[email protected]>
* Update version to 10.1.999-SNAPSHOT
* [NO-ISSUE] Fix KieRepositoryTest (#6328)
Signed-off-by: Jason Porter <[email protected]>
* removal drools-docs from the repository as it contains invalid artifacts
for the source release (apache policy issues) (#6327)
* 10.1.0 release hard requirement: cherry-pick release pipeline changes
(including conflict resolution)
Signed-off-by: Jason Porter <[email protected]>
* Revert "10.1.0 release hard requirement: cherry-pick release pipeline
changes (including conflict resolution)"
This reverts commit de51ac81173448896f0fed9ab052291af04073b1.
Signed-off-by: Jason Porter <[email protected]>
* 10.1.0 release: after a try and run fail, reverted the cherry-pick and
applied the 10.0.x state on top manually
* reverting version changes
Signed-off-by: Jason Porter <[email protected]>
* update branch.yaml
Signed-off-by: Jason Porter <[email protected]>
* undoing deleted files
* updating pom.xml
Signed-off-by: Jason Porter <[email protected]>
* Adding back in the ASF header
I'm not sure why this died, but let's see if it works with it in place.
Signed-off-by: Jason Porter <[email protected]>
* Restore deleted file
Signed-off-by: Jason Porter <[email protected]>
* Removing file
Signed-off-by: Jason Porter <[email protected]>
* Adding file that was missing.
Signed-off-by: Jason Porter <[email protected]>
---------
Signed-off-by: Jason Porter <[email protected]>
Co-authored-by: asf-ci-kie <[email protected]>
Co-authored-by: Toshiya Kobayashi <[email protected]>
Co-authored-by: Alex Porcelli <[email protected]>
Co-authored-by: Rodrigo Antunes <[email protected]>
Co-authored-by: Jason Porter <[email protected]>
---
.ci/jenkins/Jenkinsfile | 2 +-
.ci/jenkins/Jenkinsfile.deploy | 2 +-
.ci/jenkins/Jenkinsfile.promote | 2 +-
.ci/jenkins/Jenkinsfile.setup-branch | 2 +-
.ci/jenkins/Jenkinsfile.weekly.deploy | 2 +-
.ci/jenkins/config/branch.yaml | 30 ++--
.ci/jenkins/config/main.yaml | 40 +++--
.ci/jenkins/dsl/jobs.groovy | 215 +++++++++++++--------------
.ci/jenkins/project/Jenkinsfile.nightly | 2 +-
.ci/jenkins/project/Jenkinsfile.release | 118 ++-------------
.ci/jenkins/project/Jenkinsfile.setup-branch | 2 +-
.ci/jenkins/project/Jenkinsfile.weekly | 2 +-
12 files changed, 170 insertions(+), 249 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
index b765cba5bc..51f54b8879 100644
--- a/.ci/jenkins/Jenkinsfile
+++ b/.ci/jenkins/Jenkinsfile
@@ -66,4 +66,4 @@ pipeline {
cleanWs()
}
}
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 4d4cca2928..1947593ad4 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -315,4 +315,4 @@ String getReleaseGpgSignPassphraseCredsId() {
String getGitTagName() {
return params.GIT_TAG_NAME
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote
index 2fb1959336..c1c0ba9d58 100644
--- a/.ci/jenkins/Jenkinsfile.promote
+++ b/.ci/jenkins/Jenkinsfile.promote
@@ -251,4 +251,4 @@ boolean isNotTestingBuild() {
boolean isMainStream() {
return env.DROOLS_STREAM == 'main'
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch
b/.ci/jenkins/Jenkinsfile.setup-branch
index a26ad8be5b..1bc66b5006 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -166,4 +166,4 @@ boolean isMainBranch() {
boolean isMainStream() {
return env.DROOLS_STREAM == 'main'
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile.weekly.deploy
b/.ci/jenkins/Jenkinsfile.weekly.deploy
index 9f941f80f3..318a5215dc 100644
--- a/.ci/jenkins/Jenkinsfile.weekly.deploy
+++ b/.ci/jenkins/Jenkinsfile.weekly.deploy
@@ -238,4 +238,4 @@ String getProjectVersion(boolean keepSnapshotSuffix = true)
{
return projectVersion.replace("-SNAPSHOT",
"-${getProjectVersionDate()}-SNAPSHOT")
}
return projectVersion.replace("-SNAPSHOT", "-${getProjectVersionDate()}")
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml
index e777bb5efc..d6719f5c8e 100644
--- a/.ci/jenkins/config/branch.yaml
+++ b/.ci/jenkins/config/branch.yaml
@@ -1,4 +1,3 @@
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -16,7 +15,6 @@
# specific language governing permissions and limitations
# under the License.
#
-
generation_config:
missing_environment: ignore
environments:
@@ -30,36 +28,26 @@ environments:
DROOLS_BUILD_MVN_OPTS: -Dfull
ADDITIONAL_TIMEOUT: 720
ids:
- - native
+ - native
sonarcloud:
auto_generation: false
env_vars:
ENABLE_SONARCLOUD: true
DROOLS_BUILD_MVN_OPTS: -Dfull
ids:
- - sonarcloud
- - coverage
+ - sonarcloud
+ - coverage
repositories:
-- name: incubator-kie-drools
- job_display_name: drools
-# Not yet migrated to Apache
-# - name: incubator-kie-drools-website
-# job_display_name: drools-website
-- name: incubator-kie-benchmarks
- job_display_name: kie-benchmarks
-## TODO to check if should be enabled
-# - name: incubator-kie-jpmml-integration
-# job_display_name: kie-jpmml-integration
+ - name: incubator-kie-drools
+ job_display_name: drools
git:
author:
name: apache
- # Taken from https://ci-builds.apache.org/credentials/
- # Need to be verified
credentials_id: 399061d0-5ab5-4142-a186-a52081fef742
token_credentials_id: kie-ci3-token
push:
- credentials_id: 84811880-2025-45b6-a44c-2f33bef30ad2 # CI Push Access
for KIE
- token_credentials_id: 41128c14-bb63-4708-9074-d20a318ee630 # GitHub
Personal Access Token for KIE
+ credentials_id: 84811880-2025-45b6-a44c-2f33bef30ad2
+ token_credentials_id: 41128c14-bb63-4708-9074-d20a318ee630
fork_author:
name: kie-ci
credentials_id: kie-ci
@@ -106,8 +94,8 @@ cloud:
release:
gpg:
sign:
- key-credentials-id: 'GPG_KEY_FILE'
- passphrase-credentials-id: ''
+ key_credentials_id: GPG_KEY_FILE
+ passphrase_credentials_id: ''
jenkins:
email_creds_id: DROOLS_CI_NOTIFICATION_EMAILS
agent:
diff --git a/.ci/jenkins/config/main.yaml b/.ci/jenkins/config/main.yaml
index bf536966d2..929e806421 100644
--- a/.ci/jenkins/config/main.yaml
+++ b/.ci/jenkins/config/main.yaml
@@ -1,15 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
ecosystem:
main_project: drools
projects:
- - name: drools
- regexs:
- - drools.*
- - incubator-kie-drools.*
- - name: kie-benchmarks
- ignore_release: true
- regexs:
- - kie-benchmarks.*
- - incubator-kie-benchmarks.*
+ - name: drools
+ regexs:
+ - drools.*
+ - incubator-kie-drools.*
+ - name: kie-benchmarks
+ ignore_release: true
+ regexs:
+ - kie-benchmarks.*
+ - incubator-kie-benchmarks.*
git:
branches:
- name: main
@@ -40,5 +59,8 @@ jenkins:
agent:
docker:
builder:
+ # At some point, this image will need to be changed when a release
branch is created
+ # but we need to make sure the image exists first ... simple tag
before setting up the branch ?
+ # See https://github.com/kiegroup/kie-issues/issues/551
image: docker.io/apache/incubator-kie-kogito-ci-build:main-latest
args: --privileged --group-add docker
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index 131579fbdb..8f3a89459e 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -70,12 +70,12 @@ KogitoJobUtils.createMainQuarkusUpdateToolsJob(this,
void createProjectSetupBranchJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, '0-setup-branch',
JobType.SETUP_BRANCH, "${jenkins_path_project}/Jenkinsfile.setup-branch",
'Drools Setup Branch')
jobParams.env.putAll([
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_BRANCH_NAME: "${GIT_BRANCH}",
+ GIT_BRANCH_NAME: "${GIT_BRANCH}",
- IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
- DROOLS_STREAM: Utils.getStream(this),
+ IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -89,11 +89,11 @@ void setupProjectNightlyJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, '0-nightly',
JobType.NIGHTLY, "${jenkins_path_project}/Jenkinsfile.nightly", 'Drools
Nightly')
jobParams.triggers = [cron : isMainStream() ? '@midnight' : 'H 3 * * *']
jobParams.env.putAll([
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_BRANCH_NAME: "${GIT_BRANCH}",
+ GIT_BRANCH_NAME: "${GIT_BRANCH}",
- DROOLS_STREAM: Utils.getStream(this),
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -104,13 +104,13 @@ void setupProjectNightlyJob() {
void setupProjectWeeklyJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, '0-weekly',
JobType.OTHER, "${jenkins_path_project}/Jenkinsfile.weekly", 'Drools Weekly')
- jobParams.triggers = [cron : '0 2 * * 0']
+ jobParams.triggers = [cron : '0 3 * * 0']
jobParams.env.putAll([
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_BRANCH_NAME: "${GIT_BRANCH}",
+ GIT_BRANCH_NAME: "${GIT_BRANCH}",
- DROOLS_STREAM: Utils.getStream(this),
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -122,21 +122,18 @@ void setupProjectWeeklyJob() {
void setupProjectReleaseJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, '0-drools-release',
JobType.RELEASE, "${jenkins_path_project}/Jenkinsfile.release", 'Drools/Kogito
Artifacts Release')
jobParams.env.putAll([
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_BRANCH_NAME: "${GIT_BRANCH}",
- GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
-
- DEFAULT_STAGING_REPOSITORY: "${MAVEN_NEXUS_STAGING_PROFILE_URL}",
- ARTIFACTS_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
-
- DROOLS_STREAM: Utils.getStream(this),
+ GIT_BRANCH_NAME: "${GIT_BRANCH}",
+ GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
stringParam('RESTORE_FROM_PREVIOUS_JOB', '', 'URL to a previous
stopped release job which needs to be continued')
- stringParam('DROOLS_VERSION', '', 'Drools version to release as
Major.minor.micro')
+ stringParam('RELEASE_VERSION', '', 'Drools version to release as
Major.minor.micro')
+
+ stringParam('GIT_TAG_NAME', '', 'Git tag to create. i.e.:
10.0.0-rc1')
booleanParam('SKIP_TESTS', false, 'Skip all tests')
}
@@ -147,14 +144,14 @@ void setupProjectPostReleaseJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this,
'drools-post-release', JobType.RELEASE,
"${jenkins_path_project}/Jenkinsfile.post-release", 'Drools Post Release')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_BRANCH_NAME: "${GIT_BRANCH}",
- GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
+ GIT_BRANCH_NAME: "${GIT_BRANCH}",
+ GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
- DROOLS_STREAM: Utils.getStream(this),
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -171,47 +168,47 @@ void setupProjectPostReleaseJob() {
Map getMultijobPRConfig(JenkinsFolder jobFolder) {
def jobConfig = [
- parallel: true,
- buildchain: true,
- jobs : [
- [
- id: 'drools',
- primary: true,
- env : [
- // Sonarcloud analysis only on main branch
- // As we have only Community edition
- ENABLE_SONARCLOUD: EnvUtils.isDefaultEnvironment(this,
jobFolder.getEnvironmentName()) && Utils.isMainBranch(this),
- ]
- ], [
- id: 'kogito-runtimes',
- repository: 'incubator-kie-kogito-runtimes'
- ], [
- id: 'kogito-apps',
- repository: 'incubator-kie-kogito-apps',
- ], [
- id: 'kogito-quarkus-examples',
- repository: 'incubator-kie-kogito-examples',
- env : [
- KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-quarkus-examples/',
- ],
- ], [
- id: 'kogito-springboot-examples',
- repository: 'incubator-kie-kogito-examples',
- env : [
- KOGITO_EXAMPLES_SUBFOLDER_POM:
'kogito-springboot-examples/',
- ],
- ], [
- id: 'serverless-workflow-examples',
- repository: 'incubator-kie-kogito-examples',
- env : [
- KOGITO_EXAMPLES_SUBFOLDER_POM:
'serverless-workflow-examples/',
- ],
- // Commented as not migrated
- // ], [
- // id: 'kie-jpmml-integration',
- // repository: 'incubator-kie-jpmml-integration'
+ parallel: true,
+ buildchain: true,
+ jobs : [
+ [
+ id: 'drools',
+ primary: true,
+ env : [
+ // Sonarcloud analysis only on main branch
+ // As we have only Community edition
+ ENABLE_SONARCLOUD:
EnvUtils.isDefaultEnvironment(this, jobFolder.getEnvironmentName()) &&
Utils.isMainBranch(this),
+ ]
+ ], [
+ id: 'kogito-runtimes',
+ repository: 'incubator-kie-kogito-runtimes'
+ ], [
+ id: 'kogito-apps',
+ repository: 'incubator-kie-kogito-apps',
+ ], [
+ id: 'kogito-quarkus-examples',
+ repository: 'incubator-kie-kogito-examples',
+ env : [
+ KOGITO_EXAMPLES_SUBFOLDER_POM:
'kogito-quarkus-examples/',
+ ],
+ ], [
+ id: 'kogito-springboot-examples',
+ repository: 'incubator-kie-kogito-examples',
+ env : [
+ KOGITO_EXAMPLES_SUBFOLDER_POM:
'kogito-springboot-examples/',
+ ],
+ ], [
+ id: 'serverless-workflow-examples',
+ repository: 'incubator-kie-kogito-examples',
+ env : [
+ KOGITO_EXAMPLES_SUBFOLDER_POM:
'serverless-workflow-examples/',
+ ],
+ // Commented as not migrated
+ // ], [
+ // id: 'kie-jpmml-integration',
+ // repository:
'incubator-kie-jpmml-integration'
+ ]
]
- ]
]
// For Quarkus 3, run only drools PR check... for now
@@ -259,9 +256,9 @@ setupWeeklyDeployJob()
// Tools job
if (isMainStream()) {
KogitoJobUtils.createQuarkusUpdateToolsJob(this, 'drools', [
- modules: [ 'drools-build-parent' ],
- compare_deps_remote_poms: [ 'io.quarkus:quarkus-bom' ],
- properties: [ 'version.io.quarkus' ],
+ modules: [ 'drools-build-parent' ],
+ compare_deps_remote_poms: [ 'io.quarkus:quarkus-bom' ],
+ properties: [ 'version.io.quarkus' ],
])
}
@@ -281,16 +278,16 @@ void createSetupBranchJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools',
JobType.SETUP_BRANCH, "${jenkins_path}/Jenkinsfile.setup-branch", 'Drools Setup
branch')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
+ GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
- MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.NIGHTLY.name),
+ MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.NIGHTLY.name),
- IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
- DROOLS_STREAM: Utils.getStream(this),
+ IS_MAIN_BRANCH: "${Utils.isMainBranch(this)}",
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -309,22 +306,22 @@ void setupDeployJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-deploy',
JobType.RELEASE, "${jenkins_path}/Jenkinsfile.deploy", 'Drools Deploy')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
- PROPERTIES_FILE_NAME: 'deployment.properties',
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ PROPERTIES_FILE_NAME: 'deployment.properties',
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
+ GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
- MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.RELEASE.name),
- MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
- MAVEN_DEPLOY_REPOSITORY:
Utils.getMavenArtifactsUploadRepositoryUrl(this, JobType.RELEASE.name),
- MAVEN_REPO_CREDS_ID:
Utils.getMavenArtifactsUploadRepositoryCredentialsId(this,
JobType.RELEASE.name),
+ MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.RELEASE.name),
+ MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+ MAVEN_DEPLOY_REPOSITORY:
Utils.getMavenArtifactsUploadRepositoryUrl(this, JobType.RELEASE.name),
+ MAVEN_REPO_CREDS_ID:
Utils.getMavenArtifactsUploadRepositoryCredentialsId(this,
JobType.RELEASE.name),
- DROOLS_STREAM: Utils.getStream(this),
+ DROOLS_STREAM: Utils.getStream(this),
- RELEASE_GPG_SIGN_KEY_CREDS_ID:
Utils.getReleaseGpgSignKeyCredentialsId(this),
- RELEASE_GPG_SIGN_PASSPHRASE_CREDS_ID:
Utils.getReleaseGpgSignPassphraseCredentialsId(this)
+ RELEASE_GPG_SIGN_KEY_CREDS_ID:
Utils.getReleaseGpgSignKeyCredentialsId(this),
+ RELEASE_GPG_SIGN_PASSPHRASE_CREDS_ID:
Utils.getReleaseGpgSignPassphraseCredentialsId(this)
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -338,6 +335,8 @@ void setupDeployJob() {
stringParam('PROJECT_VERSION', '', 'Optional if not RELEASE. If
RELEASE, cannot be empty.')
stringParam('DROOLS_PR_BRANCH', '', 'PR branch name')
+ stringParam('GIT_TAG_NAME', '', 'Optional if not RELEASE. Tag to
be created in the repository')
+
booleanParam('SEND_NOTIFICATION', false, 'In case you want the
pipeline to send a notification on CI channel for this run.')
}
}
@@ -347,18 +346,18 @@ void setupPromoteJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-promote',
JobType.RELEASE, "${jenkins_path}/Jenkinsfile.promote", 'Drools Promote')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
- PROPERTIES_FILE_NAME: 'deployment.properties',
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ PROPERTIES_FILE_NAME: 'deployment.properties',
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
+ GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
- MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.RELEASE.name),
- MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
- MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+ MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.RELEASE.name),
+ MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+ MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
- DROOLS_STREAM: Utils.getStream(this),
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -378,19 +377,19 @@ void setupWeeklyDeployJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this,
'drools.weekly-deploy', JobType.OTHER,
"${jenkins_path}/Jenkinsfile.weekly.deploy", 'Drools Weekly Deploy')
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
- PROPERTIES_FILE_NAME: 'deployment.properties',
- JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
+ PROPERTIES_FILE_NAME: 'deployment.properties',
+ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
+ GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
- MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.NIGHTLY.name),
- MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
- MAVEN_DEPLOY_REPOSITORY:
Utils.getMavenArtifactsUploadRepositoryUrl(this, JobType.NIGHTLY.name),
- MAVEN_REPO_CREDS_ID:
Utils.getMavenArtifactsUploadRepositoryCredentialsId(this,
JobType.NIGHTLY.name),
+ MAVEN_SETTINGS_CONFIG_FILE_ID:
Utils.getMavenSettingsConfigFileId(this, JobType.NIGHTLY.name),
+ MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
+ MAVEN_DEPLOY_REPOSITORY:
Utils.getMavenArtifactsUploadRepositoryUrl(this, JobType.NIGHTLY.name),
+ MAVEN_REPO_CREDS_ID:
Utils.getMavenArtifactsUploadRepositoryCredentialsId(this,
JobType.NIGHTLY.name),
- DROOLS_STREAM: Utils.getStream(this),
+ DROOLS_STREAM: Utils.getStream(this),
])
KogitoJobTemplate.createPipelineJob(this, jobParams)?.with {
parameters {
@@ -405,4 +404,4 @@ void setupWeeklyDeployJob() {
booleanParam('SEND_NOTIFICATION', false, 'In case you want the
pipeline to send a notification on CI channel for this run.')
}
}
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/project/Jenkinsfile.nightly
b/.ci/jenkins/project/Jenkinsfile.nightly
index f5e41fd585..4391733ce5 100644
--- a/.ci/jenkins/project/Jenkinsfile.nightly
+++ b/.ci/jenkins/project/Jenkinsfile.nightly
@@ -187,4 +187,4 @@ void addBooleanParam(List buildParams, String key, boolean
value) {
String getBuildBranch() {
return env.GIT_BRANCH_NAME
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/project/Jenkinsfile.release
b/.ci/jenkins/project/Jenkinsfile.release
index 030dbeb6b7..1287fe191f 100644
--- a/.ci/jenkins/project/Jenkinsfile.release
+++ b/.ci/jenkins/project/Jenkinsfile.release
@@ -54,22 +54,17 @@ pipeline {
echo "Release properties imported from previous job:
${releaseProperties}"
}
- assert getDroolsVersion()
+ assert getReleaseVersion()
currentBuild.displayName = getDisplayName()
- sendNotification("Release Pipeline has started...\nDrools
version = ${getDroolsVersion()}\n=> ${env.BUILD_URL}")
-
- // Safety measure to not publish to main JBoss
- if (getGitAuthor() != 'apache' &&
!getArtifactsRepositoryParam()) {
- sendNotification("Git Author is different from
`apache` and no `ARTIFACTS_REPOSITORY` parameter has been provided. Are you
sure you want to continue ? => ${env.BUILD_URL}input")
- input message: 'Should the pipeline continue with no
`ARTIFACTS_REPOSITORY` defined ?', ok: 'Yes'
- }
+ sendNotification("Release Pipeline has started...\nDrools
version = ${getReleaseVersion()}\n=> ${env.BUILD_URL}")
}
}
post {
always {
- setReleasePropertyIfneeded('drools.version',
getDroolsVersion())
+ setReleasePropertyIfneeded('release.version',
getReleaseVersion())
+ setReleasePropertyIfneeded('git.tag.name', getGitTagName())
}
}
}
@@ -79,89 +74,21 @@ pipeline {
script {
def buildParams = getDefaultBuildParams()
addSkipTestsParam(buildParams)
-
buildJob(getDeployJobName(droolsRepo), buildParams)
}
}
}
- // stage('Build & Deploy KIE jpmml integration') {
- // steps {
- // script {
- // def buildParams = getDefaultBuildParams()
- // addSkipTestsParam(buildParams)
-
- // buildJob(getDeployJobName(kieJpmmlIntegrationRepo),
buildParams)
- // }
- // }
- // }
-
stage('Artifacts\' staging finalization') {
steps {
script {
if (!areArtifactsStaged()) {
- sendNotification("All artifacts have been staged. You
can find them here: ${getStagingRepository()}")
+ sendNotification('All artifacts have been staged.')
}
setArtifactsStaged()
}
}
}
-
- stage('Are staged artifacts released?') {
- when {
- // Execute only if artifacts repository was not given, which
means the staging repository has been created
- expression { return !getArtifactsRepositoryParam() &&
!areArtifactsReleased() }
- }
- steps {
- script {
- String body = "${getDroolsVersion()} artifacts are ready
for release.\n" +
- "Please release the staging repositories and
then confirm here: ${env.BUILD_URL}input"
- sendNotification(body)
- input message: 'Has the staging repository been released
?', ok: 'Yes'
-
- sendNotification('Artifacts have been released. Finalizing
now the release ...')
- setArtifactsReleased()
- }
- }
- }
-
- stage('Promote Drools') {
- when {
- expression { return
isJobConsideredOk(getDeployJobName(droolsRepo)) }
- }
- steps {
- script {
- def buildParams = getDefaultBuildParams()
- addDeployBuildUrlParam(buildParams,
getDeployJobName(droolsRepo))
-
- buildJob(getPromoteJobName(droolsRepo), buildParams)
- }
- }
- }
-
- // stage('Promote KIE jpmml integration') {
- // when {
- // expression { return
isJobConsideredOk(getDeployJobName(kieJpmmlIntegrationRepo)) }
- // }
- // steps {
- // script {
- // def buildParams = getDefaultBuildParams()
- // addDeployBuildUrlParam(buildParams,
getDeployJobName(kieJpmmlIntegrationRepo))
-
- // buildJob(getPromoteJobName(kieJpmmlIntegrationRepo),
buildParams)
- // }
- // }
- // }
-
- stage('Setup next snapshot version') {
- steps {
- script {
- def buildParams = []
- addStringParam(buildParams, 'DROOLS_VERSION',
util.getNextVersion(getDroolsVersion(), 'micro'))
- build(job: '../setup-branch/0-setup-branch', wait: false,
parameters: buildParams, propagate: false)
- }
- }
- }
}
post {
always {
@@ -232,10 +159,6 @@ String getDeployJobName(String repository) {
return "${repository}-deploy"
}
-String getPromoteJobName(String repository) {
- return "${repository}-promote"
-}
-
String getJobPropertySuffix(String jobName) {
return "${JOB_PROPERTY_PREFIX}.${jobName}"
}
@@ -330,9 +253,10 @@ def readPropertiesFromUrl(String url, String
propsFilename) {
List getDefaultBuildParams() {
List buildParams = []
- addDisplayNameParam(buildParams, getDisplayName(getDroolsVersion()))
- addStringParam(buildParams, 'PROJECT_VERSION', getDroolsVersion())
- addStringParam(buildParams, 'DROOLS_PR_BRANCH',
"drools-${getDroolsVersion()}")
+ addDisplayNameParam(buildParams, getDisplayName(getReleaseVersion()))
+ addStringParam(buildParams, 'PROJECT_VERSION', getReleaseVersion())
+ addStringParam(buildParams, 'DROOLS_PR_BRANCH',
"drools-${getReleaseVersion()}")
+ addStringParam(buildParams, 'GIT_TAG_NAME', getGitTagName())
return buildParams
}
@@ -367,26 +291,18 @@ void addBooleanParam(List buildParams, String key,
boolean value) {
}
String getDisplayName(version = '') {
- version = version ?: getDroolsVersion()
+ version = version ?: getReleaseVersion()
return "Release ${version}"
}
-String getDroolsVersion() {
- return params.DROOLS_VERSION ?: getReleaseProperty('drools.version')
+String getReleaseVersion() {
+ return params.RELEASE_VERSION ?: getReleaseProperty('release.version')
}
String getGitAuthor() {
return env.GIT_AUTHOR
}
-String getArtifactsRepositoryParam() {
- return env['ARTIFACTS_REPOSITORY'] ?: ''
-}
-
-String getStagingRepository() {
- return getArtifactsRepositoryParam() ?: env.DEFAULT_STAGING_REPOSITORY
-}
-
void setReleasePropertyIfneeded(String key, def value) {
if (value) {
releaseProperties[key] = value
@@ -415,10 +331,6 @@ void setArtifactsStaged() {
setReleasePropertyIfneeded(ARTIFACTS_STAGING_STAGE, true)
}
-boolean areArtifactsReleased() {
- return hasReleaseProperty(ARTIFACTS_RELEASE_STAGE)
-}
-
-void setArtifactsReleased() {
- setReleasePropertyIfneeded(ARTIFACTS_RELEASE_STAGE, true)
-}
+String getGitTagName() {
+ return params.GIT_TAG_NAME ?: getReleaseProperty('git.tag.name')
+}
\ No newline at end of file
diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch
b/.ci/jenkins/project/Jenkinsfile.setup-branch
index e50bd30b4d..4a6a18c46b 100644
--- a/.ci/jenkins/project/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/project/Jenkinsfile.setup-branch
@@ -225,4 +225,4 @@ String getVersionFromReleaseBranch(String releaseBranch,
int microVersion = 999,
} else {
error 'Cannot parse given branch as a release branch, aka [M].[m].x
...'
}
-}
+}
\ No newline at end of file
diff --git a/.ci/jenkins/project/Jenkinsfile.weekly
b/.ci/jenkins/project/Jenkinsfile.weekly
index a3d5aeea3a..2a7e3322bd 100644
--- a/.ci/jenkins/project/Jenkinsfile.weekly
+++ b/.ci/jenkins/project/Jenkinsfile.weekly
@@ -180,4 +180,4 @@ String getCurrentDate() {
String getCheckoutDatetime() {
return getCurrentDate() + ' 02:00' // Cut-off 02:00AM
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]