Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kiegroup repository references to apache #5519

Merged
merged 10 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .ci/buildchain-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ default:
docker system prune -f

build:
- project: kiegroup/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"`
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
- 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"`
mvn clean ${{ env.MVN_CMD }} -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS }}
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/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"`
Expand All @@ -57,7 +57,7 @@ build:
**/cypress/screenshots/**
**/cypress/videos/**

- project: kiegroup/kogito-examples
- project: apache/incubator-kie-kogito-examples
build-command:
# First install the main pom
# Then build the required submodule pom
Expand Down
30 changes: 15 additions & 15 deletions .ci/buildchain-project-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2.1"
dependencies:
- project: kiegroup/drools
- project: apache/incubator-kie-drools
mapping:
dependencies:
default:
Expand All @@ -13,9 +13,9 @@ dependencies:
# exclude:
# - kiegroup/kie-jpmml-integration

- project: kiegroup/kogito-runtimes
- project: apache/incubator-kie-kogito-runtimes
dependencies:
- project: kiegroup/drools
- project: apache/incubator-kie-drools
mapping:
dependencies:
default:
Expand All @@ -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/incubator-kie-kogito-examples
- apache/incubator-kie-kogito-apps

- project: kiegroup/kogito-apps
- project: apache/incubator-kie-kogito-apps
dependencies:
- project: kiegroup/kogito-runtimes
- project: apache/incubator-kie-kogito-runtimes
mapping:
dependencies:
default:
Expand All @@ -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/incubator-kie-kogito-examples
- apache/incubator-kie-kogito-runtimes

- project: kiegroup/kogito-examples
- project: apache/incubator-kie-kogito-examples
dependencies:
- project: kiegroup/kogito-runtimes
- project: kiegroup/kogito-apps
- project: apache/incubator-kie-kogito-runtimes
- project: apache/incubator-kie-kogito-apps
mapping:
dependencies:
default:
Expand All @@ -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/incubator-kie-kogito-apps
- apache/incubator-kie-kogito-runtimes

# - project: kiegroup/kie-jpmml-integration
# dependencies:
# - project: kiegroup/drools
# - project: apache/incubator-kie-drools
# no mapping needed
2 changes: 1 addition & 1 deletion .ci/environments/common/update_quarkus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)

echo "Update project with Quarkus version ${QUARKUS_VERSION}"

Expand Down
2 changes: 1 addition & 1 deletion .ci/environments/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash
6 changes: 3 additions & 3 deletions .ci/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ pipeline {
timeout(time: 360, unit: 'MINUTES')
}
environment {
BUILDCHAIN_PROJECT = 'kiegroup/drools'
BUILDCHAIN_CONFIG_REPO = 'drools'
BUILDCHAIN_PROJECT = 'apache/incubator-kie-drools'
BUILDCHAIN_CONFIG_REPO = 'incubator-kie-drools'
BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml'

ENABLE_SONARCLOUD = 'true'
Expand All @@ -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('incubator-kie-kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds'))
pr_check_script = load 'dsl/scripts/pr_check.groovy'
}
}
Expand Down
4 changes: 1 addition & 3 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import org.kie.jenkins.MavenStagingHelper

deployProperties = [:]

droolsRepository = 'drools'

pipeline {
agent {
docker {
Expand Down Expand Up @@ -209,7 +207,7 @@ boolean shouldStageArtifacts() {
}

boolean shouldDeployToRepository() {
return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'kiegroup'
return env.MAVEN_DEPLOY_REPOSITORY || getGitAuthor() == 'apache'
}

boolean isRelease() {
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.promote
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void uploadFileMgmt(String directory) {
}

boolean isNotTestingBuild() {
return getGitAuthor() == 'kiegroup'
return getGitAuthor() == 'apache'
}

boolean isMainStream() {
Expand Down
24 changes: 16 additions & 8 deletions .ci/jenkins/config/branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,25 @@ environments:
disable:
triggers: true # TODO to set back
repositories:
- name: drools
# - name: drools-website # not migrated yet
- name: kie-benchmarks
- 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-kie-benchmarks
job_display_name: kie-benchmarks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: 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
Expand All @@ -67,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
Expand Down
12 changes: 7 additions & 5 deletions .ci/jenkins/config/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,28 @@ ecosystem:
- name: drools
regexs:
- drools.*
- 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: apache_migration
- name: main
main_branch: true
seed:
config_file:
git:
repository: drools
repository: incubator-kie-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
20 changes: 9 additions & 11 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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/incubator-kie-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/incubator-kie-kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
*/

import org.kie.jenkins.jobdsl.model.JenkinsFolder
Expand Down Expand Up @@ -144,31 +144,32 @@ 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/',
],
// Commented as not migrated
// ], [
// id: 'kie-jpmml-integration',
// repository: 'kie-jpmml-integration'
// repository: 'incubator-kie-kie-jpmml-integration'
]
]
]
Expand Down Expand Up @@ -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}",
Expand Down Expand Up @@ -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}",

Expand Down Expand Up @@ -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}",

Expand Down
8 changes: 4 additions & 4 deletions .ci/jenkins/dsl/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=kiegroup/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/kiegroup/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} $@
2 changes: 1 addition & 1 deletion .ci/jenkins/project/Jenkinsfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/project/Jenkinsfile.post-release
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pipeline {
stage('Update drools version in drools-website') {
steps {
script {
String droolsWebsiteRepository = 'drools-website'
String droolsWebsiteRepository = 'incubator-kie-drools-website'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Website repos are being moved out to later phase.

String prLink = null
String prBranchName = "${getProjectVersion().toLowerCase()}-${env.PR_BRANCH_HASH}"
dir(droolsWebsiteRepository) {
Expand Down
6 changes: 3 additions & 3 deletions .ci/jenkins/project/Jenkinsfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
}
}
Expand Down
1 change: 1 addition & 0 deletions .ci/jenkins/project/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pipeline {
}
}

// Commented as not migrated for now
// stage('Init KIE jpmml integration') {
// steps {
// script {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-downstream-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}/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
Expand Down
Loading
Loading