From 48f535510e18148f33ce3227f597445dbc9b2bc5 Mon Sep 17 00:00:00 2001 From: radtriste Date: Fri, 8 Sep 2023 14:53:53 +0200 Subject: [PATCH 1/7] updated pipelines --- .ci/jenkins/Jenkinsfile.deploy | 21 +++++-------------- .ci/jenkins/Jenkinsfile.promote | 10 ++++----- .ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr | 9 ++++---- .../Jenkinsfile.quarkus-3.rewrite.standalone | 10 ++++----- .ci/jenkins/Jenkinsfile.setup-branch | 19 ++++------------- .ci/jenkins/dsl/jobs.groovy | 15 ++++++------- .ci/jenkins/project/Jenkinsfile.post-release | 16 ++++---------- .ci/jenkins/project/Jenkinsfile.release | 6 ------ .ci/jenkins/project/Jenkinsfile.setup-branch | 7 ------- 9 files changed, 31 insertions(+), 82 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index f0135cb9e24..713eb876bc6 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -10,12 +10,10 @@ droolsRepository = 'drools' pipeline { agent { - label 'ubuntu' - } - - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + } } options { @@ -23,20 +21,11 @@ pipeline { timeout(time: 180, unit: 'MINUTES') } - // parameters { - // For parameters, check into ./dsl/jobs.groovy file - // } - environment { - // Static env is defined into ./dsl/jobs.groovy file - DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") - // Keep here for visitibility - MAVEN_OPTS = '-Xms1024m -Xmx4g' - PR_BRANCH_HASH = "${util.generateHash(10)}" - MAVEN_DEPLOY_LOCAL_DIR = "${WORKSPACE}/maven_deploy_dir" + MAVEN_DEPLOY_LOCAL_DIR = "/tmp/maven_deploy_dir" } stages { diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 5221120344b..2c7d058c750 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -8,12 +8,10 @@ pipelineProperties = [:] pipeline { agent { - label 'ubuntu' - } - - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + } } options { diff --git a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr index e92ceaf3d9a..5a4b689871c 100644 --- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr +++ b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr @@ -7,11 +7,10 @@ changeBranch = env.ghprbSourceBranch ?: CHANGE_BRANCH pipeline { agent { - label 'ubuntu' - } - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + } } options { timestamps() diff --git a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone index b5b67433f16..4e2c7cf7ee9 100644 --- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone +++ b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone @@ -7,12 +7,10 @@ previousHash = '' pipeline { agent { - label 'ubuntu' - } - - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + } } options { diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch index afc7f009031..95b74cfcbe6 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch +++ b/.ci/jenkins/Jenkinsfile.setup-branch @@ -5,12 +5,10 @@ import org.kie.jenkins.MavenCommand pipeline { agent { - label 'ubuntu' - } - - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + } } options { @@ -18,18 +16,9 @@ pipeline { timeout(time: 60, unit: 'MINUTES') } - // parameters { - // For parameters, check into ./dsl/jobs.groovy file - // } - environment { - // Static env is defined into ./dsl/jobs.groovy file - DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") - // Keep here for visitibility - MAVEN_OPTS = '-Xms1024m -Xmx4g' - BRANCH_HASH = "${util.generateHash(10)}" } diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index e74db85ad53..f5d0aa78811 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -106,7 +106,7 @@ void setupProjectReleaseJob() { void setupProjectPostReleaseJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-post-release', JobType.RELEASE, "${jenkins_path_project}/Jenkinsfile.post-release", 'Drools Post Release') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", @@ -148,9 +148,6 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) { ], [ id: 'kogito-apps', repository: 'kogito-apps', - env : [ - NODE_OPTIONS: '--max_old_space_size=4096', - ] ], [ id: 'kogito-quarkus-examples', repository: 'kogito-examples', @@ -242,7 +239,7 @@ void setupSpecificBuildChainNightlyJob(String envName, Closure defaultJobParamsG void createSetupBranchJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools', JobType.SETUP_BRANCH, "${jenkins_path}/Jenkinsfile.setup-branch", 'Drools Setup branch') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ REPO_NAME: 'drools', JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", @@ -270,7 +267,7 @@ void createSetupBranchJob() { void setupDeployJob(JobType jobType) { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-deploy', jobType, "${jenkins_path}/Jenkinsfile.deploy", 'Drools Deploy') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ REPO_NAME: 'drools', PROPERTIES_FILE_NAME: 'deployment.properties', @@ -314,7 +311,7 @@ void setupDeployJob(JobType jobType) { void setupPromoteJob(JobType jobType) { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-promote', jobType, "${jenkins_path}/Jenkinsfile.promote", 'Drools Promote') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ REPO_NAME: 'drools', PROPERTIES_FILE_NAME: 'deployment.properties', @@ -346,7 +343,7 @@ void setupPromoteJob(JobType jobType) { void setupPrQuarkus3RewriteJob() { def jobParams = JobParamsUtils.getBasicJobParamsWithEnv(this, 'drools.rewrite', JobType.PULL_REQUEST, 'quarkus-3', "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr", 'Drools Quarkus 3 rewrite patch regeneration') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.jenkinsfile = "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr" jobParams.pr.putAll([ run_only_for_branches: [ "${GIT_BRANCH}" ], @@ -365,7 +362,7 @@ void setupPrQuarkus3RewriteJob() { void setupStandaloneQuarkus3RewriteJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools.quarkus-3.rewrite', JobType.TOOLS, "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.standalone", 'Drools Quarkus 3 rewrite patch regeneration') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll(EnvUtils.getEnvironmentEnvVars(this, 'quarkus-3')) jobParams.env.putAll([ AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", diff --git a/.ci/jenkins/project/Jenkinsfile.post-release b/.ci/jenkins/project/Jenkinsfile.post-release index cc4a8dc2718..6627c4cab3c 100644 --- a/.ci/jenkins/project/Jenkinsfile.post-release +++ b/.ci/jenkins/project/Jenkinsfile.post-release @@ -7,12 +7,10 @@ import org.kie.jenkins.MavenCommand pipeline { agent { - label 'ubuntu' - } - - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + } } options { @@ -21,13 +19,7 @@ pipeline { disableConcurrentBuilds(abortPrevious: true) } - // parameters { - // For parameters, check into .jenkins/dsl/jobs.groovy file - // } - environment { - // Some generated env is also defined into .jenkins/dsl/jobs.groovy file - DROOLS_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") PR_BRANCH_HASH = "${util.generateHash(10)}" diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 26f0c77b4b0..0848703bbf8 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -21,13 +21,7 @@ pipeline { label 'ubuntu' } - // parameters { - // For parameters, check into ./dsl/jobs.groovy file - // } - environment { - // Some generated env is also defined into ./dsl/jobs.groovy file - DROOLS_CI_EMAIL = credentials("${JENKINS_EMAIL_CREDS_ID}") } diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index f2bba114317..736ef8455d9 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -10,7 +10,6 @@ JOBS = [:] FAILED_STAGES = [:] UNSTABLE_STAGES = [:] -// Should be multibranch pipeline pipeline { agent { label 'ubuntu' @@ -20,13 +19,7 @@ pipeline { timeout(time: 360, unit: 'MINUTES') } - // parameters { - // For parameters, check into ./dsl/jobs.groovy file - // } - environment { - // Some generated env is also defined into ./dsl/jobs.groovy file - DROOLS_CI_EMAIL = credentials("${JENKINS_EMAIL_CREDS_ID}") // Use branch name in nightly tag as we may have parallel main and release branch builds From c8f23de9a4ca419cb9ccbe34fbee492ae7806fbe Mon Sep 17 00:00:00 2001 From: radtriste Date: Fri, 8 Sep 2023 15:24:42 +0200 Subject: [PATCH 2/7] Setup jenkinsfile --- .ci/jenkins/Jenkinsfile | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .ci/jenkins/Jenkinsfile diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile new file mode 100644 index 00000000000..3a1196057d1 --- /dev/null +++ b/.ci/jenkins/Jenkinsfile @@ -0,0 +1,43 @@ +@Library('jenkins-pipeline-shared-libraries')_ + +pr_check_script = null + +pipeline { + agent { + label 'ubuntu' + } + options { + timestamps() + timeout(time: '720', unit: 'MINUTES') + } + environment { + BUILDCHAIN_PROJECT = 'kiegroup/drools' + BUILDCHAIN_CONFIG_REPO = 'drools' + BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml' + + ENABLE_SONARCLOUD = 'true' + DROOLS_BUILD_MVN_OPTS = '-Prun-code-coverage' + } + stages { + stage('Initialize') { + steps { + script { + // load `pr_check.groovy` file from kogito-pipelines:main + dir('kogito-pipelines') { + checkout(githubscm.resolveRepository('kogito-pipelines', 'kiegroup', 'apache_migration', false, 'kie-ci')) // TODO to change back to kiegroup:main + pr_check_script = load 'dsl/scripts/pr_check.groovy' + } + } + } + } + stage('PR check') { + steps { + script { + dir('kogito-pipelines') { + pr_check_script.launch() + } + } + } + } + } +} From 21e34425992e110a4c8281f409161fd3f01f4dbf Mon Sep 17 00:00:00 2001 From: radtriste Date: Fri, 8 Sep 2023 16:18:34 +0200 Subject: [PATCH 3/7] Update kiegroup repository references to apache --- .ci/buildchain-config.yaml | 10 +++---- .ci/buildchain-project-dependencies.yaml | 34 +++++++++++------------ .ci/environments/common/update_quarkus.sh | 2 +- .ci/environments/update.sh | 2 +- .ci/jenkins/Jenkinsfile | 4 +-- .ci/jenkins/Jenkinsfile.deploy | 2 +- .ci/jenkins/Jenkinsfile.promote | 2 +- .ci/jenkins/config/branch.yaml | 8 ++++-- .ci/jenkins/config/main.yaml | 8 +++--- .ci/jenkins/dsl/jobs.groovy | 4 +-- .ci/jenkins/dsl/test.sh | 4 +-- .ci/jenkins/project/Jenkinsfile.release | 4 +-- .github/workflows/pr-downstream-full.yml | 2 +- .github/workflows/pr-downstream.yml | 4 +-- .github/workflows/pr-drools-ansible.yml | 4 +-- .github/workflows/pr-drools.yml | 2 +- .github/workflows/pr-jenkins.yml | 4 +-- 17 files changed, 51 insertions(+), 49 deletions(-) diff --git a/.ci/buildchain-config.yaml b/.ci/buildchain-config.yaml index b1472f2662d..ced2ab1887d 100644 --- a/.ci/buildchain-config.yaml +++ b/.ci/buildchain-config.yaml @@ -28,7 +28,7 @@ default: docker system prune -f build: - - project: kiegroup/drools + - project: apache/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"` @@ -36,7 +36,7 @@ build: upstream: | mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM }} - - project: kiegroup/kogito-runtimes + - project: apache/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"` @@ -44,7 +44,7 @@ build: upstream: | mvn clean install -Dquickly -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }} - - project: kiegroup/kogito-apps + - project: apache/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"` @@ -57,7 +57,7 @@ build: **/cypress/screenshots/** **/cypress/videos/** - - project: kiegroup/kogito-examples + - project: apache/kogito-examples build-command: # First install the main pom # Then build the required submodule pom @@ -68,7 +68,7 @@ build: upstream: | mvn clean install -DskipTests -DskipITs ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }} - - project: kiegroup/kie-jpmml-integration + - project: apache/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"` diff --git a/.ci/buildchain-project-dependencies.yaml b/.ci/buildchain-project-dependencies.yaml index 5940dae1cd1..850e773bd89 100644 --- a/.ci/buildchain-project-dependencies.yaml +++ b/.ci/buildchain-project-dependencies.yaml @@ -1,6 +1,6 @@ version: "2.1" dependencies: - - project: kiegroup/drools + - project: apache/drools mapping: dependencies: default: @@ -11,11 +11,11 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)" exclude: - - kiegroup/kie-jpmml-integration + - apache/kie-jpmml-integration - - project: kiegroup/kogito-runtimes + - project: apache/kogito-runtimes dependencies: - - project: kiegroup/drools + - project: apache/drools mapping: dependencies: default: @@ -26,12 +26,12 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)" exclude: - - kiegroup/kogito-examples - - kiegroup/kogito-apps + - apache/kogito-examples + - apache/kogito-apps - - project: kiegroup/kogito-apps + - project: apache/kogito-apps dependencies: - - project: kiegroup/kogito-runtimes + - project: apache/kogito-runtimes mapping: dependencies: default: @@ -42,13 +42,13 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)" exclude: - - kiegroup/kogito-examples - - kiegroup/kogito-runtimes + - apache/kogito-examples + - apache/kogito-runtimes - - project: kiegroup/kogito-examples + - project: apache/kogito-examples dependencies: - - project: kiegroup/kogito-runtimes - - project: kiegroup/kogito-apps + - project: apache/kogito-runtimes + - project: apache/kogito-apps mapping: dependencies: default: @@ -59,10 +59,10 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)" exclude: - - kiegroup/kogito-apps - - kiegroup/kogito-runtimes + - apache/kogito-apps + - apache/kogito-runtimes - - project: kiegroup/kie-jpmml-integration + - project: apache/kie-jpmml-integration dependencies: - - project: kiegroup/drools + - project: apache/drools # no mapping needed diff --git a/.ci/environments/common/update_quarkus.sh b/.ci/environments/common/update_quarkus.sh index dc187436ad9..7816a70a99c 100755 --- a/.ci/environments/common/update_quarkus.sh +++ b/.ci/environments/common/update_quarkus.sh @@ -3,7 +3,7 @@ set -euo pipefail mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}" -source <(curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh) +source <(curl -s https://raw.githubusercontent.com/apache/kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh) echo "Update project with Quarkus version ${QUARKUS_VERSION}" diff --git a/.ci/environments/update.sh b/.ci/environments/update.sh index bda16c4ef81..ebb068dd5eb 100755 --- a/.ci/environments/update.sh +++ b/.ci/environments/update.sh @@ -45,4 +45,4 @@ if [ -f "${env_path}/after.sh" ]; then fi # Download `setup_integration_branch` script and execute -curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash \ No newline at end of file +curl -s https://raw.githubusercontent.com/apache/kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash \ No newline at end of file diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile index 3a1196057d1..2df78d62911 100644 --- a/.ci/jenkins/Jenkinsfile +++ b/.ci/jenkins/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { timeout(time: '720', unit: 'MINUTES') } environment { - BUILDCHAIN_PROJECT = 'kiegroup/drools' + BUILDCHAIN_PROJECT = 'apache/drools' BUILDCHAIN_CONFIG_REPO = 'drools' BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml' @@ -24,7 +24,7 @@ pipeline { script { // load `pr_check.groovy` file from kogito-pipelines:main dir('kogito-pipelines') { - checkout(githubscm.resolveRepository('kogito-pipelines', 'kiegroup', 'apache_migration', false, 'kie-ci')) // TODO to change back to kiegroup:main + checkout(githubscm.resolveRepository('kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds')) pr_check_script = load 'dsl/scripts/pr_check.groovy' } } diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 713eb876bc6..d35987113ad 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -209,7 +209,7 @@ boolean shouldStageArtifacts() { } boolean shouldDeployToRepository() { - return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'kiegroup' + return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'apache' } boolean isRelease() { diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 2c7d058c750..2b027750cfe 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -220,7 +220,7 @@ void uploadFileMgmt(String directory) { } boolean isNotTestingBuild() { - return getGitAuthor() == 'kiegroup' + return getGitAuthor() == 'apache' } boolean isMainStream() { diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index e15a9d92d45..54cadb5ca79 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -53,9 +53,11 @@ repositories: # - name: kie-jpmml-integration ## TODO to check if should be enabled git: author: - name: kiegroup - credentials_id: kie-ci4 - token_credentials_id: kie-ci4-token + name: apache + # Taken from https://ci-builds.apache.org/credentials/ + # Need to be verified + credentials_id: 399061d0-5ab5-4142-a186-a52081fef742 + token_credentials_id: ci-builds fork_author: name: kie-ci credentials_id: kie-ci diff --git a/.ci/jenkins/config/main.yaml b/.ci/jenkins/config/main.yaml index d28a83a688a..d5222f29a26 100644 --- a/.ci/jenkins/config/main.yaml +++ b/.ci/jenkins/config/main.yaml @@ -13,17 +13,17 @@ ecosystem: - kie-benchmarks.* git: branches: - - name: apache_migration + - name: main main_branch: true seed: config_file: git: repository: drools author: - name: kiegroup + name: apache credentials_id: kie-ci4 - branch: apache_migration + branch: main path: .ci/jenkins/config/branch.yaml jenkinsfile: dsl/seed/jenkinsfiles/Jenkinsfile.seed.branch jenkins: - email_creds_id: KOGITO_CI_NOTIFICATION_EMAILS + email_creds_id: DROOLS_CI_NOTIFICATION_EMAILS diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index f5d0aa78811..7f2e5d65ced 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -2,10 +2,10 @@ * This file is describing all the Jenkins jobs in the DSL format (see https://plugins.jenkins.io/job-dsl/) * needed by the Kogito pipelines. * -* The main part of Jenkins job generation is defined into the https://github.com/kiegroup/kogito-pipelines repository. +* The main part of Jenkins job generation is defined into the https://github.com/apache/kogito-pipelines repository. * * This file is making use of shared libraries defined in -* https://github.com/kiegroup/kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl. +* https://github.com/apache/kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl. */ import org.kie.jenkins.jobdsl.model.JenkinsFolder diff --git a/.ci/jenkins/dsl/test.sh b/.ci/jenkins/dsl/test.sh index 054bc9b0a86..817fca1af96 100755 --- a/.ci/jenkins/dsl/test.sh +++ b/.ci/jenkins/dsl/test.sh @@ -23,12 +23,12 @@ fi git_author="$(echo ${git_url} | awk -F"${git_server_url}" '{print $2}' | awk -F. '{print $1}' | awk -F/ '{print $1}')" export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/drools -export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=kiegroup/drools +export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=apache/drools export DSL_DEFAULT_MAIN_CONFIG_FILE_PATH=.ci/jenkins/config/main.yaml export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/drools file=$(mktemp) # For more usage of the script, use ./test.sh -h -curl -o ${file} https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh +curl -o ${file} https://raw.githubusercontent.com/apache/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh chmod u+x ${file} ${file} $@ \ No newline at end of file diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 0848703bbf8..6a18b063b23 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -42,8 +42,8 @@ pipeline { sendNotification("Release Pipeline has started...\nDrools version = ${getDroolsVersion()}\n=> ${env.BUILD_URL}") // Safety measure to not publish to main JBoss - if (getGitAuthor() != 'kiegroup' && !getArtifactsRepositoryParam()) { - sendNotification("Git Author is different from `kiegroup` and no `ARTIFACTS_REPOSITORY` parameter has been provided. Are you sure you want to continue ? => ${env.BUILD_URL}input") + 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' } } diff --git a/.github/workflows/pr-downstream-full.yml b/.github/workflows/pr-downstream-full.yml index 3fb5cb4ffbc..5697893a885 100644 --- a/.github/workflows/pr-downstream-full.yml +++ b/.github/workflows/pr-downstream-full.yml @@ -44,7 +44,7 @@ jobs: - name: Build Chain uses: kiegroup/kie-ci/.ci/actions/build-chain@main with: - definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools/${BRANCH:main}/.ci/buildchain-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools/${BRANCH:main}/.ci/buildchain-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" flow-type: full-downstream diff --git a/.github/workflows/pr-downstream.yml b/.github/workflows/pr-downstream.yml index e412502a418..3a34d81381a 100644 --- a/.github/workflows/pr-downstream.yml +++ b/.github/workflows/pr-downstream.yml @@ -60,9 +60,9 @@ jobs: - name: Build Chain uses: kiegroup/kie-ci/.ci/actions/build-chain@main with: - definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools/${BRANCH:main}/.ci/buildchain-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools/${BRANCH:main}/.ci/buildchain-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} - starting-project: kiegroup/${{ matrix.repository }} + starting-project: apache/${{ matrix.repository }} github-token: "${{ secrets.GITHUB_TOKEN }}" env: BUILD_MVN_OPTS: ${{ matrix.env_BUILD_MVN_OPTS }} diff --git a/.github/workflows/pr-drools-ansible.yml b/.github/workflows/pr-drools-ansible.yml index 0db53b48aa6..21b89cd5e0c 100644 --- a/.github/workflows/pr-drools-ansible.yml +++ b/.github/workflows/pr-drools-ansible.yml @@ -43,7 +43,7 @@ jobs: - name: Build Chain uses: kiegroup/kie-ci/.ci/actions/build-chain@main with: - definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools-ansible-rulebook-integration/${BRANCH:main}/.ci/pull-request-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools-ansible-rulebook-integration/${BRANCH:main}/.ci/pull-request-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" - starting-project: kiegroup/drools-ansible-rulebook-integration \ No newline at end of file + starting-project: apache/drools-ansible-rulebook-integration \ No newline at end of file diff --git a/.github/workflows/pr-drools.yml b/.github/workflows/pr-drools.yml index f7bf51a9fa8..ebc226cc19e 100644 --- a/.github/workflows/pr-drools.yml +++ b/.github/workflows/pr-drools.yml @@ -44,7 +44,7 @@ jobs: env: BUILD_MVN_OPTS_CURRENT: -Dfull with: - definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools/${BRANCH:main}/.ci/buildchain-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools/${BRANCH:main}/.ci/buildchain-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Surefire Report diff --git a/.github/workflows/pr-jenkins.yml b/.github/workflows/pr-jenkins.yml index a66f0acb88f..3c2bc14f02f 100644 --- a/.github/workflows/pr-jenkins.yml +++ b/.github/workflows/pr-jenkins.yml @@ -19,6 +19,6 @@ jobs: uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main with: project: drools - main-config-file-repo: kiegroup/drools + main-config-file-repo: apache/drools main-config-file-path: .ci/jenkins/config/main.yaml - branch-config-file-repo: kiegroup/drools + branch-config-file-repo: apache/drools From 0af42b01fa75962d54788368448dd01af03f751a Mon Sep 17 00:00:00 2001 From: radtriste Date: Mon, 11 Sep 2023 13:52:56 +0200 Subject: [PATCH 4/7] update references --- .ci/buildchain-config.yaml | 10 +++---- .ci/buildchain-project-dependencies.yaml | 34 +++++++++++------------ .ci/environments/common/update_quarkus.sh | 2 +- .ci/environments/update.sh | 2 +- .ci/jenkins/Jenkinsfile | 2 +- .ci/jenkins/dsl/jobs.groovy | 16 +++++------ .ci/jenkins/dsl/test.sh | 8 +++--- .github/workflows/pr-downstream-full.yml | 2 +- .github/workflows/pr-downstream.yml | 14 +++++----- .github/workflows/pr-drools-ansible.yml | 4 +-- .github/workflows/pr-drools.yml | 2 +- .github/workflows/pr-jenkins.yml | 6 ++-- 12 files changed, 51 insertions(+), 51 deletions(-) diff --git a/.ci/buildchain-config.yaml b/.ci/buildchain-config.yaml index ced2ab1887d..8a75ec0e70e 100644 --- a/.ci/buildchain-config.yaml +++ b/.ci/buildchain-config.yaml @@ -28,7 +28,7 @@ default: docker system prune -f build: - - project: apache/drools + - project: apache/incubator-kie-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"` @@ -36,7 +36,7 @@ build: upstream: | mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM }} - - project: apache/kogito-runtimes + - project: apache/incubator-kie-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"` @@ -44,7 +44,7 @@ build: upstream: | mvn clean install -Dquickly -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }} - - project: apache/kogito-apps + - project: apache/incubator-kie-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"` @@ -57,7 +57,7 @@ build: **/cypress/screenshots/** **/cypress/videos/** - - project: apache/kogito-examples + - project: apache/incubator-kie-kogito-examples build-command: # First install the main pom # Then build the required submodule pom @@ -68,7 +68,7 @@ build: upstream: | mvn clean install -DskipTests -DskipITs ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }} - - project: apache/kie-jpmml-integration + - 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"` diff --git a/.ci/buildchain-project-dependencies.yaml b/.ci/buildchain-project-dependencies.yaml index 850e773bd89..14ced4b3418 100644 --- a/.ci/buildchain-project-dependencies.yaml +++ b/.ci/buildchain-project-dependencies.yaml @@ -1,6 +1,6 @@ version: "2.1" dependencies: - - project: apache/drools + - project: apache/incubator-kie-drools mapping: dependencies: default: @@ -11,11 +11,11 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)" exclude: - - apache/kie-jpmml-integration + - kiegroup/kie-jpmml-integration - - project: apache/kogito-runtimes + - project: apache/incubator-kie-kogito-runtimes dependencies: - - project: apache/drools + - project: apache/incubator-kie-drools mapping: dependencies: default: @@ -26,12 +26,12 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)" exclude: - - apache/kogito-examples - - apache/kogito-apps + - apache/incubator-kie-kogito-examples + - apache/incubator-kie-kogito-apps - - project: apache/kogito-apps + - project: apache/incubator-kie-kogito-apps dependencies: - - project: apache/kogito-runtimes + - project: apache/incubator-kie-kogito-runtimes mapping: dependencies: default: @@ -42,13 +42,13 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)" exclude: - - apache/kogito-examples - - apache/kogito-runtimes + - apache/incubator-kie-kogito-examples + - apache/incubator-kie-kogito-runtimes - - project: apache/kogito-examples + - project: apache/incubator-kie-kogito-examples dependencies: - - project: apache/kogito-runtimes - - project: apache/kogito-apps + - project: apache/incubator-kie-kogito-runtimes + - project: apache/incubator-kie-kogito-apps mapping: dependencies: default: @@ -59,10 +59,10 @@ dependencies: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1-7}.${n2}`)" exclude: - - apache/kogito-apps - - apache/kogito-runtimes + - apache/incubator-kie-kogito-apps + - apache/incubator-kie-kogito-runtimes - - project: apache/kie-jpmml-integration + - project: kiegroup/kie-jpmml-integration dependencies: - - project: apache/drools + - project: apache/incubator-kie-drools # no mapping needed diff --git a/.ci/environments/common/update_quarkus.sh b/.ci/environments/common/update_quarkus.sh index 7816a70a99c..2dbf3ac7bd8 100755 --- a/.ci/environments/common/update_quarkus.sh +++ b/.ci/environments/common/update_quarkus.sh @@ -3,7 +3,7 @@ set -euo pipefail mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}" -source <(curl -s https://raw.githubusercontent.com/apache/kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh) +source <(curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh) echo "Update project with Quarkus version ${QUARKUS_VERSION}" diff --git a/.ci/environments/update.sh b/.ci/environments/update.sh index ebb068dd5eb..0ee06957644 100755 --- a/.ci/environments/update.sh +++ b/.ci/environments/update.sh @@ -45,4 +45,4 @@ if [ -f "${env_path}/after.sh" ]; then fi # Download `setup_integration_branch` script and execute -curl -s https://raw.githubusercontent.com/apache/kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash \ No newline at end of file +curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash \ No newline at end of file diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile index 2df78d62911..ed014f1bb87 100644 --- a/.ci/jenkins/Jenkinsfile +++ b/.ci/jenkins/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { timeout(time: '720', unit: 'MINUTES') } environment { - BUILDCHAIN_PROJECT = 'apache/drools' + BUILDCHAIN_PROJECT = 'apache/incubator-kie-drools' BUILDCHAIN_CONFIG_REPO = 'drools' BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml' diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 7f2e5d65ced..eeb210766e2 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -2,10 +2,10 @@ * This file is describing all the Jenkins jobs in the DSL format (see https://plugins.jenkins.io/job-dsl/) * needed by the Kogito pipelines. * -* The main part of Jenkins job generation is defined into the https://github.com/apache/kogito-pipelines repository. +* The main part of Jenkins job generation is defined into the https://github.com/apache/incubator-kie-kogito-pipelines repository. * * This file is making use of shared libraries defined in -* https://github.com/apache/kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl. +* https://github.com/apache/incubator-kie-kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl. */ import org.kie.jenkins.jobdsl.model.JenkinsFolder @@ -144,31 +144,31 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) { ] ], [ id: 'kogito-runtimes', - repository: 'kogito-runtimes' + repository: 'incubator-kie-kogito-runtimes' ], [ id: 'kogito-apps', - repository: 'kogito-apps', + repository: 'incubator-kie-kogito-apps', ], [ id: 'kogito-quarkus-examples', - repository: 'kogito-examples', + repository: 'incubator-kie-kogito-examples', env : [ KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-quarkus-examples/', ], ], [ id: 'kogito-springboot-examples', - repository: 'kogito-examples', + repository: 'incubator-kie-kogito-examples', env : [ KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-springboot-examples/', ], ], [ id: 'serverless-workflow-examples', - repository: 'kogito-examples', + repository: 'incubator-kie-kogito-examples', env : [ KOGITO_EXAMPLES_SUBFOLDER_POM: 'serverless-workflow-examples/', ], ], [ id: 'kie-jpmml-integration', - repository: 'kie-jpmml-integration' + repository: 'incubator-kie-kie-jpmml-integration' ] ] ] diff --git a/.ci/jenkins/dsl/test.sh b/.ci/jenkins/dsl/test.sh index 817fca1af96..64d478475fb 100755 --- a/.ci/jenkins/dsl/test.sh +++ b/.ci/jenkins/dsl/test.sh @@ -22,13 +22,13 @@ fi git_author="$(echo ${git_url} | awk -F"${git_server_url}" '{print $2}' | awk -F. '{print $1}' | awk -F/ '{print $1}')" -export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/drools -export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=apache/drools +export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/incubator-kie-drools +export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=apache/incubator-kie-drools export DSL_DEFAULT_MAIN_CONFIG_FILE_PATH=.ci/jenkins/config/main.yaml -export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/drools +export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/incubator-kie-drools file=$(mktemp) # For more usage of the script, use ./test.sh -h -curl -o ${file} https://raw.githubusercontent.com/apache/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh +curl -o ${file} https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/seed_test.sh chmod u+x ${file} ${file} $@ \ No newline at end of file diff --git a/.github/workflows/pr-downstream-full.yml b/.github/workflows/pr-downstream-full.yml index 5697893a885..95227651c28 100644 --- a/.github/workflows/pr-downstream-full.yml +++ b/.github/workflows/pr-downstream-full.yml @@ -44,7 +44,7 @@ jobs: - name: Build Chain uses: kiegroup/kie-ci/.ci/actions/build-chain@main with: - definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools/${BRANCH:main}/.ci/buildchain-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-drools/${BRANCH:main}/.ci/buildchain-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" flow-type: full-downstream diff --git a/.github/workflows/pr-downstream.yml b/.github/workflows/pr-downstream.yml index 3a34d81381a..d165b3ed5f7 100644 --- a/.github/workflows/pr-downstream.yml +++ b/.github/workflows/pr-downstream.yml @@ -26,21 +26,21 @@ jobs: maven-version: ['3.8.7'] include: - job_name: kogito-runtimes - repository: kogito-runtimes + repository: incubator-kie-kogito-runtimes - job_name: kogito-apps - repository: kogito-apps + repository: incubator-kie-kogito-apps env_BUILD_MVN_OPTS: "-DskipUI" - job_name: kogito-quarkus-examples - repository: kogito-examples + repository: incubator-kie-kogito-examples env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-quarkus-examples/ - job_name: kogito-springboot-examples - repository: kogito-examples + repository: incubator-kie-kogito-examples env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-springboot-examples/ - job_name: serverless-workflow-examples - repository: kogito-examples + repository: incubator-kie-kogito-examples env_KOGITO_EXAMPLES_SUBFOLDER_POM: serverless-workflow-examples/ - job_name: kie-jpmml-integration - repository: kie-jpmml-integration + repository: incubator-kie-kie-jpmml-integration fail-fast: false runs-on: ${{ matrix.os }} name: ${{ matrix.job_name }} (${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }}) @@ -60,7 +60,7 @@ jobs: - name: Build Chain uses: kiegroup/kie-ci/.ci/actions/build-chain@main with: - definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools/${BRANCH:main}/.ci/buildchain-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-drools/${BRANCH:main}/.ci/buildchain-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} starting-project: apache/${{ matrix.repository }} github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pr-drools-ansible.yml b/.github/workflows/pr-drools-ansible.yml index 21b89cd5e0c..0db53b48aa6 100644 --- a/.github/workflows/pr-drools-ansible.yml +++ b/.github/workflows/pr-drools-ansible.yml @@ -43,7 +43,7 @@ jobs: - name: Build Chain uses: kiegroup/kie-ci/.ci/actions/build-chain@main with: - definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools-ansible-rulebook-integration/${BRANCH:main}/.ci/pull-request-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/drools-ansible-rulebook-integration/${BRANCH:main}/.ci/pull-request-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" - starting-project: apache/drools-ansible-rulebook-integration \ No newline at end of file + starting-project: kiegroup/drools-ansible-rulebook-integration \ No newline at end of file diff --git a/.github/workflows/pr-drools.yml b/.github/workflows/pr-drools.yml index ebc226cc19e..ea66d468a89 100644 --- a/.github/workflows/pr-drools.yml +++ b/.github/workflows/pr-drools.yml @@ -44,7 +44,7 @@ jobs: env: BUILD_MVN_OPTS_CURRENT: -Dfull with: - definition-file: https://raw.githubusercontent.com/${GROUP:apache}/drools/${BRANCH:main}/.ci/buildchain-config.yaml + definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-drools/${BRANCH:main}/.ci/buildchain-config.yaml annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Surefire Report diff --git a/.github/workflows/pr-jenkins.yml b/.github/workflows/pr-jenkins.yml index 3c2bc14f02f..3f8bee26ff1 100644 --- a/.github/workflows/pr-jenkins.yml +++ b/.github/workflows/pr-jenkins.yml @@ -18,7 +18,7 @@ jobs: - name: DSL tests uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main with: - project: drools - main-config-file-repo: apache/drools + project: incubator-kie-drools + main-config-file-repo: apache/incubator-kie-drools main-config-file-path: .ci/jenkins/config/main.yaml - branch-config-file-repo: apache/drools + branch-config-file-repo: apache/incubator-kie-drools From db8411b3d153647afb7615a7987f1b0c83f68ef4 Mon Sep 17 00:00:00 2001 From: radtriste Date: Tue, 12 Sep 2023 10:47:26 +0200 Subject: [PATCH 5/7] updated repo names --- .ci/jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile index ed014f1bb87..9bd900a5340 100644 --- a/.ci/jenkins/Jenkinsfile +++ b/.ci/jenkins/Jenkinsfile @@ -24,7 +24,7 @@ pipeline { script { // load `pr_check.groovy` file from kogito-pipelines:main dir('kogito-pipelines') { - checkout(githubscm.resolveRepository('kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds')) + checkout(githubscm.resolveRepository('incubator-kie-kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds')) pr_check_script = load 'dsl/scripts/pr_check.groovy' } } From 403e2a68e2f0003439125eb7949c26dc06547658 Mon Sep 17 00:00:00 2001 From: radtriste Date: Tue, 12 Sep 2023 11:16:33 +0200 Subject: [PATCH 6/7] updated config with job_display_name --- .ci/jenkins/config/branch.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index 6354077c20e..448acf23c1b 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -45,12 +45,17 @@ environments: disable: triggers: true # TODO to set back repositories: -- name: drools -- name: drools-website -- name: kie-benchmarks +- name: incubator-kie-drools + job_display_name: drools +- name: incubator-kie-drools-website + job_display_name: drools-website +- name: incubator-kie-kie-benchmarks + job_display_name: kie-benchmarks author: name: radtriste # TODO set back. Could not push to kiegroup -# - name: kie-jpmml-integration ## TODO to check if should be enabled +## TODO to check if should be enabled +# - name: incubator-kie-kie-jpmml-integration +# job_display_name: kie-jpmml-integration git: author: name: apache From 2d76cb514862e09a38582ad7bc4ae3cb77e7b781 Mon Sep 17 00:00:00 2001 From: radtriste Date: Tue, 12 Sep 2023 14:56:16 +0200 Subject: [PATCH 7/7] various updates --- .ci/buildchain-config.yaml | 14 +++--- .ci/buildchain-project-dependencies.yaml | 10 ++--- .ci/jenkins/Jenkinsfile | 2 +- .ci/jenkins/Jenkinsfile.deploy | 2 - .ci/jenkins/config/branch.yaml | 7 +-- .ci/jenkins/config/main.yaml | 10 +++-- .ci/jenkins/dsl/jobs.groovy | 10 ++--- .ci/jenkins/project/Jenkinsfile.nightly | 34 +++++++-------- .ci/jenkins/project/Jenkinsfile.post-release | 2 +- .ci/jenkins/project/Jenkinsfile.release | 46 ++++++++++---------- .ci/jenkins/project/Jenkinsfile.setup-branch | 29 ++++++------ 11 files changed, 83 insertions(+), 83 deletions(-) diff --git a/.ci/buildchain-config.yaml b/.ci/buildchain-config.yaml index 8a75ec0e70e..10d4943f11f 100644 --- a/.ci/buildchain-config.yaml +++ b/.ci/buildchain-config.yaml @@ -68,10 +68,10 @@ build: upstream: | mvn clean install -DskipTests -DskipITs ${{ 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 }} + # - 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 }} diff --git a/.ci/buildchain-project-dependencies.yaml b/.ci/buildchain-project-dependencies.yaml index 14ced4b3418..7d1bfb80cf9 100644 --- a/.ci/buildchain-project-dependencies.yaml +++ b/.ci/buildchain-project-dependencies.yaml @@ -10,8 +10,8 @@ dependencies: default: - source: (\d*)\.(.*) targetExpression: "process.env.GITHUB_BASE_REF.replace(/(\\d*)\\.(.*)/g, (m, n1, n2) => `${+n1+7}.${n2}`)" - exclude: - - kiegroup/kie-jpmml-integration + # exclude: + # - kiegroup/kie-jpmml-integration - project: apache/incubator-kie-kogito-runtimes dependencies: @@ -62,7 +62,7 @@ dependencies: - apache/incubator-kie-kogito-apps - apache/incubator-kie-kogito-runtimes - - project: kiegroup/kie-jpmml-integration - dependencies: - - project: apache/incubator-kie-drools + # - project: kiegroup/kie-jpmml-integration + # dependencies: + # - project: apache/incubator-kie-drools # no mapping needed diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile index 9bd900a5340..95ae2c9622b 100644 --- a/.ci/jenkins/Jenkinsfile +++ b/.ci/jenkins/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { } environment { BUILDCHAIN_PROJECT = 'apache/incubator-kie-drools' - BUILDCHAIN_CONFIG_REPO = 'drools' + BUILDCHAIN_CONFIG_REPO = 'incubator-kie-drools' BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml' ENABLE_SONARCLOUD = 'true' diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index d35987113ad..12b11ea345c 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -6,8 +6,6 @@ import org.kie.jenkins.MavenStagingHelper deployProperties = [:] -droolsRepository = 'drools' - pipeline { agent { docker { diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index 448acf23c1b..75c2c766a48 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -47,8 +47,9 @@ disable: repositories: - name: incubator-kie-drools job_display_name: drools -- name: incubator-kie-drools-website - job_display_name: drools-website +# Not yet migrated to Apache +# - name: incubator-kie-drools-website +# job_display_name: drools-website - name: incubator-kie-kie-benchmarks job_display_name: kie-benchmarks author: @@ -74,7 +75,7 @@ git: jenkins_config_path: .ci/jenkins buildchain_config: git: - repository: drools + repository: incubator-kie-drools file_path: .ci/buildchain-config.yaml maven: settings_file_id: kie-release-settings diff --git a/.ci/jenkins/config/main.yaml b/.ci/jenkins/config/main.yaml index d5222f29a26..e70ea3ed966 100644 --- a/.ci/jenkins/config/main.yaml +++ b/.ci/jenkins/config/main.yaml @@ -4,13 +4,15 @@ ecosystem: - name: drools regexs: - drools.* - - name: kie-jpmml-integration - regexs: - - kie-jpmml-integration.* + - incubator-kie-drools.* + # - name: kie-jpmml-integration + # regexs: + # - kie-jpmml-integration.* - name: kie-benchmarks ignore_release: true regexs: - kie-benchmarks.* + - incubator-kie-kie-benchmarks.* git: branches: - name: main @@ -18,7 +20,7 @@ git: seed: config_file: git: - repository: drools + repository: incubator-kie-drools author: name: apache credentials_id: kie-ci4 diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index eeb210766e2..1e67d7dc407 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -166,9 +166,10 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) { env : [ KOGITO_EXAMPLES_SUBFOLDER_POM: 'serverless-workflow-examples/', ], - ], [ - id: 'kie-jpmml-integration', - repository: 'incubator-kie-kie-jpmml-integration' + // Commented as not migrated + // ], [ + // id: 'kie-jpmml-integration', + // repository: 'incubator-kie-kie-jpmml-integration' ] ] ] @@ -241,7 +242,6 @@ 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([ - REPO_NAME: 'drools', JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", GIT_AUTHOR: "${GIT_AUTHOR_NAME}", @@ -269,7 +269,6 @@ void setupDeployJob(JobType jobType) { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-deploy', jobType, "${jenkins_path}/Jenkinsfile.deploy", 'Drools Deploy') JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ - REPO_NAME: 'drools', PROPERTIES_FILE_NAME: 'deployment.properties', JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", @@ -313,7 +312,6 @@ void setupPromoteJob(JobType jobType) { def jobParams = JobParamsUtils.getBasicJobParams(this, 'drools-promote', jobType, "${jenkins_path}/Jenkinsfile.promote", 'Drools Promote') JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ - REPO_NAME: 'drools', PROPERTIES_FILE_NAME: 'deployment.properties', JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly index 704bf42d2d7..187f1af31af 100644 --- a/.ci/jenkins/project/Jenkinsfile.nightly +++ b/.ci/jenkins/project/Jenkinsfile.nightly @@ -4,7 +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' +// KIE_JPMML_INTEGRATION_DEPLOY = 'kie-jpmml-integration.build-and-deploy' // Commented as not migrated for now // Map of executed jobs // See https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html @@ -60,22 +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) - } - } - } + // 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.post-release b/.ci/jenkins/project/Jenkinsfile.post-release index 6627c4cab3c..a23c2cff2e3 100644 --- a/.ci/jenkins/project/Jenkinsfile.post-release +++ b/.ci/jenkins/project/Jenkinsfile.post-release @@ -36,7 +36,7 @@ pipeline { stage('Update drools version in drools-website') { steps { script { - String droolsWebsiteRepository = 'drools-website' + String droolsWebsiteRepository = 'incubator-kie-drools-website' String prLink = null String prBranchName = "${getProjectVersion().toLowerCase()}-${env.PR_BRANCH_HASH}" dir(droolsWebsiteRepository) { diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 6a18b063b23..65943d551aa 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -3,7 +3,7 @@ import org.jenkinsci.plugins.workflow.libs.Library @Library('jenkins-pipeline-shared-libraries')_ droolsRepo = 'drools' -kieJpmmlIntegrationRepo = 'kie-jpmml-integration' +// kieJpmmlIntegrationRepo = 'kie-jpmml-integration' // Commented as not migrated for now ARTIFACTS_STAGING_STAGE = 'stage.artifacts.staging' ARTIFACTS_RELEASE_STAGE = 'stage.artifacts.release' @@ -66,16 +66,16 @@ pipeline { } } - stage('Build & Deploy KIE jpmml integration') { - steps { - script { - def buildParams = getDefaultBuildParams() - addSkipTestsParam(buildParams) + // stage('Build & Deploy KIE jpmml integration') { + // steps { + // script { + // def buildParams = getDefaultBuildParams() + // addSkipTestsParam(buildParams) - buildJob(getDeployJobName(kieJpmmlIntegrationRepo), buildParams) - } - } - } + // buildJob(getDeployJobName(kieJpmmlIntegrationRepo), buildParams) + // } + // } + // } stage('Artifacts\' staging finalization') { steps { @@ -120,19 +120,19 @@ 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('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 { diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index 736ef8455d9..0aa94e67220 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -55,20 +55,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') - } - } - } + // Commented as not migrated for now + // 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') {