From d7608dfea5f7259412267e54a08290357e73f946 Mon Sep 17 00:00:00 2001 From: radtriste Date: Fri, 11 Aug 2023 11:01:07 +0200 Subject: [PATCH] Added `kie-jpmml-integration` config --- .ci/buildchain-config.yaml | 8 ++++++ .ci/buildchain-project-dependencies.yaml | 5 ++++ .ci/jenkins/config/branch.yaml | 1 + .ci/jenkins/config/main.yaml | 4 +++ .ci/jenkins/dsl/jobs.groovy | 5 +++- .ci/jenkins/project/Jenkinsfile.nightly | 17 +++++++++++++ .ci/jenkins/project/Jenkinsfile.release | 26 ++++++++++++++++++++ .ci/jenkins/project/Jenkinsfile.setup-branch | 15 +++++++++++ .github/workflows/pr-downstream.yml | 2 ++ 9 files changed, 82 insertions(+), 1 deletion(-) diff --git a/.ci/buildchain-config.yaml b/.ci/buildchain-config.yaml index 6d2cbb3b8b25..b52583836ef0 100644 --- a/.ci/buildchain-config.yaml +++ b/.ci/buildchain-config.yaml @@ -67,3 +67,11 @@ build: 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/kie-jpmml-integration + build-command: + current: | + export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KIE_JPMML_INTEGRATION_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"` + mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KIE_JPMML_INTEGRATION_BUILD_MVN_OPTS }} + upstream: | + mvn clean install -DskipTests ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KIE_JPMML_INTEGRATION_BUILD_MVN_OPTS_UPSTREAM }} \ No newline at end of file diff --git a/.ci/buildchain-project-dependencies.yaml b/.ci/buildchain-project-dependencies.yaml index 31d0afcc939e..df8f8ebcdcbb 100644 --- a/.ci/buildchain-project-dependencies.yaml +++ b/.ci/buildchain-project-dependencies.yaml @@ -59,3 +59,8 @@ dependencies: exclude: - kiegroup/kogito-apps - kiegroup/kogito-runtimes + + - project: kiegroup/kie-jpmml-integration + dependencies: + - project: kiegroup/drools + # no mapping needed diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index d4d8be132877..52efa359b0d1 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -59,6 +59,7 @@ repositories: - name: drools - name: drools-website - name: kie-benchmarks +- name: kie-jpmml-integration productized_repositories: - name: drools git: diff --git a/.ci/jenkins/config/main.yaml b/.ci/jenkins/config/main.yaml index a20829964514..9bb4406f70c4 100644 --- a/.ci/jenkins/config/main.yaml +++ b/.ci/jenkins/config/main.yaml @@ -4,6 +4,10 @@ ecosystem: - name: drools regexs: - drools.* + - name: kie-jpmml-integration + ignore_productization: true + regexs: + - kie-jpmml-integration.* - name: kie-benchmarks ignore_release: true ignore_productization: true diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 5113f1bf7e38..8a94e35b71a6 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -75,7 +75,7 @@ void setupProjectNightlyJob() { JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", GIT_BRANCH_NAME: "${GIT_BRANCH}", - + DROOLS_STREAM: getDroolsStream(), ]) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { @@ -177,6 +177,9 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) { env : [ KOGITO_EXAMPLES_SUBFOLDER_POM: 'serverless-workflow-examples/', ], + ], [ + id: 'kie-jpmml-integration', + repository: 'kie-jpmml-integration' ] ] ] diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly index f152bb8512b5..9a86e3bc9187 100644 --- a/.ci/jenkins/project/Jenkinsfile.nightly +++ b/.ci/jenkins/project/Jenkinsfile.nightly @@ -4,6 +4,7 @@ import org.jenkinsci.plugins.workflow.libs.Library // Deploy jobs DROOLS_DEPLOY = 'drools.build-and-deploy' +KIE_JPMM_INTEGRATION_DEPLOY = 'kie-jpmml-integration.build-and-deploy' // Map of executed jobs // See https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html @@ -59,6 +60,22 @@ pipeline { } } } + stage('Build & Deploy KIE jpmml integration') { + steps { + script { + def buildParams = getDefaultBuildParams() + addSkipTestsParam(buildParams) + addSkipIntegrationTestsParam(buildParams) + + buildJob(KIE_JPMM_INTEGRATION_DEPLOY, buildParams) + } + } + post { + failure { + addFailedStage(KIE_JPMM_INTEGRATION_DEPLOY) + } + } + } } post { unsuccessful { diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 7ae7218e0531..6db923a0b74b 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -3,6 +3,7 @@ import org.jenkinsci.plugins.workflow.libs.Library @Library('jenkins-pipeline-shared-libraries')_ droolsRepo = 'drools' +kieJpmmlIntegrationRepo = 'kie-jpmml-integration' ARTIFACTS_STAGING_STAGE = 'stage.artifacts.staging' ARTIFACTS_RELEASE_STAGE = 'stage.artifacts.release' @@ -71,6 +72,17 @@ pipeline { } } + stage('Build & Deploy KIE jpmml integration') { + steps { + script { + def buildParams = getDefaultBuildParams() + addSkipTestsParam(buildParams) + + buildJob(getDeployJobName(kieJpmmlIntegrationRepo), buildParams) + } + } + } + stage('Artifacts\' staging finalization') { steps { script { @@ -114,6 +126,20 @@ pipeline { } } + 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 { diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index 5609f8621b66..8a2cd653d73f 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -62,6 +62,21 @@ pipeline { } } + stage('Init KIE jpmml integration') { + steps { + script { + def buildParams = getDefaultBuildParams() + addDroolsVersionParam(buildParams) + buildJob('kie-jpmml-integration', buildParams) + } + } + post { + failure { + addFailedStage('kie-jpmml-integration') + } + } + } + // Launch the nightly to deploy all artifacts from the branch stage('Launch the nightly') { when { diff --git a/.github/workflows/pr-downstream.yml b/.github/workflows/pr-downstream.yml index 67c58d7ea23f..b27f1eb191f3 100644 --- a/.github/workflows/pr-downstream.yml +++ b/.github/workflows/pr-downstream.yml @@ -39,6 +39,8 @@ jobs: - job_name: serverless-workflow-examples repository: kogito-examples env_KOGITO_EXAMPLES_SUBFOLDER_POM: serverless-workflow-examples/ + - job_name: kie-jpmml-integration + repository: kie-jpmml-integration fail-fast: false runs-on: ${{ matrix.os }} name: ${{ matrix.job_name }} (${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }})