diff --git a/.ci/buildchain-config.yaml b/.ci/buildchain-config.yaml index 6d2cbb3b8b2..b52583836ef 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 31d0afcc939..df8f8ebcdcb 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 d4d8be13287..52efa359b0d 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 0d8307edee2..6d46b63fddc 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 5113f1bf7e3..8a94e35b71a 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 f152bb8512b..a03ad66e849 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_JPMML_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_JPMML_INTEGRATION_DEPLOY, buildParams) + } + } + post { + failure { + addFailedStage(KIE_JPMML_INTEGRATION_DEPLOY) + } + } + } } post { unsuccessful { diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 7ae7218e053..6db923a0b74 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 5609f8621b6..8a2cd653d73 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 67c58d7ea23..e412502a418 100644 --- a/.github/workflows/pr-downstream.yml +++ b/.github/workflows/pr-downstream.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 180 strategy: matrix: - job_name: [ kogito-runtimes, kogito-apps, kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ] + job_name: [ kogito-runtimes, kogito-apps, kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples, kie-jpmml-integration ] os: [ubuntu-latest] java-version: [11] maven-version: ['3.8.7'] @@ -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 }})