Skip to content

Commit

Permalink
Setup DSL branch config after productized branch creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins CI committed Jun 26, 2023
1 parent d0f7599 commit 16466a8
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 144 deletions.
79 changes: 35 additions & 44 deletions .ci/buildchain-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
version: "2.1"

version: '2.1'
dependencies: ./buildchain-project-dependencies.yaml

pre: |
export BUILD_MVN_OPTS="${{ env.BUILD_MVN_OPTS }} -nsu -ntp -fae -e -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3"
echo "BUILD_MVN_OPTS=${{ env.BUILD_MVN_OPTS }}"
export BUILD_MVN_OPTS_CURRENT="${{ env.BUILD_MVN_OPTS_CURRENT }} dependency:tree"
echo "BUILD_MVN_OPTS_CURRENT=${{ env.BUILD_MVN_OPTS_CURRENT }}"
echo "QUARKUS_VERSION=${{ env.QUARKUS_VERSION }}"
echo "ENABLE_DEPLOY=${{ env.ENABLE_DEPLOY }}"
default:
build-command:
before:
Expand All @@ -26,44 +23,38 @@ default:
after:
current: |
docker system prune -f
build:
- project: kiegroup/drools
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.DROOLS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.DROOLS_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM }}
- project: kiegroup/kogito-runtimes
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_RUNTIMES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }}
- project: kiegroup/kogito-apps
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_APPS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM }}
archive-artifacts:
path: |
**/*.log
**/cypress/screenshots/**
**/cypress/videos/**
- project: kiegroup/kogito-examples
build-command:
# First install the main pom
# Then build the required submodule pom
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_EXAMPLES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn -pl :kogito-examples clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }}
mvn -f ${{ env.KOGITO_EXAMPLES_SUBFOLDER_POM }}pom.xml clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }}
- project: kiegroup/drools
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.DROOLS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.DROOLS_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM }}
- project: kiegroup/kogito-runtimes
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_RUNTIMES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }}
- project: kiegroup/kogito-apps
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_APPS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM }}
archive-artifacts:
path: |
**/*.log
**/cypress/screenshots/**
**/cypress/videos/**
- project: kiegroup/kogito-examples
build-command:
current: |
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_EXAMPLES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"`
mvn -pl :kogito-examples clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }}
mvn -f ${{ env.KOGITO_EXAMPLES_SUBFOLDER_POM }}pom.xml clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }}
upstream: |
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }}
107 changes: 52 additions & 55 deletions .ci/buildchain-project-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,58 @@
version: "2.1"
version: '2.1'
dependencies:
- project: kiegroup/drools
mapping:
dependencies:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)
- project: kiegroup/kogito-runtimes
dependencies:
- project: kiegroup/drools
mapping:
dependencies:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"

mapping:
dependencies:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)
exclude:
- kiegroup/kogito-examples
- kiegroup/kogito-apps
- project: kiegroup/kogito-apps
dependencies:
- project: kiegroup/kogito-runtimes
mapping:
dependencies:
- project: kiegroup/drools
mapping:
dependencies:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
exclude:
- kiegroup/kogito-examples
- kiegroup/kogito-apps

default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)
exclude:
- kiegroup/kogito-examples
- kiegroup/kogito-runtimes
- project: kiegroup/kogito-examples
dependencies:
- project: kiegroup/kogito-runtimes
- project: kiegroup/kogito-apps
mapping:
dependencies:
- project: kiegroup/kogito-runtimes
mapping:
dependencies:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
exclude:
- kiegroup/kogito-examples
- kiegroup/kogito-runtimes

- project: kiegroup/kogito-examples
dependencies:
- project: kiegroup/kogito-runtimes
- project: kiegroup/kogito-apps
mapping:
dependencies:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)"
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)\\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)"
exclude:
- kiegroup/kogito-apps
- kiegroup/kogito-runtimes
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1+7}.${n2}.${n3}`)
dependant:
default:
- source: (\d*)\.(.*)\.(.*)
targetExpression: process.env.GITHUB_BASE_REF.replace(/(\d*)\.(.*)\.(.*)/g, (m, n1, n2, n3) => `${+n1-7}.${n2}.${n3}`)
exclude:
- kiegroup/kogito-apps
- kiegroup/kogito-runtimes
60 changes: 15 additions & 45 deletions .ci/jenkins/config/branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,66 +4,34 @@ environments:
NATIVE: true
BUILD_MVN_OPTS_CURRENT: -Dnative -Dquarkus.native.container-build=true
ADDITIONAL_TIMEOUT: 720
BUILD_MVN_OPTS: '-Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral '
ids:
- native
native-lts:
env_vars:
NATIVE: true
BUILD_MVN_OPTS: -Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral
BUILD_MVN_OPTS_CURRENT: -Dnative -Dquarkus.native.container-build=true
QUARKUS_BRANCH: '2.13'
ADDITIONAL_TIMEOUT: 720
ids:
- native
- prod
quarkus-main:
enabled: false
env_vars:
QUARKUS_BRANCH: main
ids:
- quarkus
quarkus-3:
pull_request_default_check: false
env_vars:
BUILD_MAVEN_TOOL: kie-maven-3.9.1
BUILD_JDK_TOOL: kie-jdk17
BUILD_MVN_OPTS: -Denforcer.skip
ids:
- quarkus
- quarkus3
enabled: false
enabled: true
quarkus-branch:
env_vars:
QUARKUS_BRANCH: '2.16'
BUILD_MVN_OPTS: '-Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral '
ids:
- quarkus
quarkus-lts:
pull_request_default_check: false
env_vars:
BUILD_MVN_OPTS: -Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral
QUARKUS_BRANCH: '2.13'
ids:
- quarkus
- lts
- prod
sonarcloud:
auto_generation: false
enabled: true
default:
enabled: true
env_vars:
ENABLE_SONARCLOUD: true
ids:
- sonarcloud
- coverage
productized_branch: false
BUILD_MVN_OPTS: '-Dproductized -Ddata-index-ephemeral.image=quay.io/kiegroup/kogito-data-index-ephemeral '
productized_branch: true
disable:
triggers: false
triggers: true
repositories:
- name: drools
branch: 8.40.x
branch: 8.40.x-prod
is_branch_config_repo: true
- name: drools-website
branch: 8.40.x
branch: 8.40.x-prod
productized_repositories:
- name: drools
branch: 8.40.x-prod
is_branch_config_repo: true
git:
author:
name: kiegroup
Expand Down Expand Up @@ -113,3 +81,5 @@ jenkins:
default_tools:
jdk: kie-jdk11
maven: kie-maven-3.8.7
generation_config:
missing_environment: ignore

0 comments on commit 16466a8

Please sign in to comment.