Skip to content

Commit 1baf390

Browse files
radtristejstastny-cz
authored andcommitted
kie-issues#574 Initial ASF Jenkins CI Setup
update Remove PR job updated dsl config [apache_migration] Update pipelines (#2967) Update pipelines remove optaplanner-website PR multibranchPipelineJob (#2975) * PR multibranchPipelineJob * set Jenkinsfile timeout time as int --------- Co-authored-by: jstastny-cz <[email protected]> Update kiegroup references to apache (#2981) Co-authored-by: radtriste <[email protected]> Co-authored-by: jstastny-cz <[email protected]> Fix CI references to kie-docs and kie-benchmarks (#2982) Co-authored-by: jstastny-cz <[email protected]> use apache/incubator-kie-benchmarks in branch config (#2983) Co-authored-by: jstastny-cz <[email protected]> Remove branch override for quickstarts from branch config (#2984) Co-authored-by: jstastny-cz <[email protected]> Switch to main branch in config
1 parent b965480 commit 1baf390

29 files changed

+207
-741
lines changed

.ci/buildchain-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ default:
2525
docker system prune -f
2626
2727
build:
28-
- project: kiegroup/optaplanner
28+
- project: apache/incubator-kie-optaplanner
2929
build-command:
3030
before:
3131
upstream: |
@@ -35,7 +35,7 @@ build:
3535
upstream: |
3636
mvn clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.OPTAPLANNER_BUILD_MVN_OPTS_UPSTREAM }}
3737
38-
- project: kiegroup/optaplanner-quickstarts
38+
- project: apache/incubator-kie-optaplanner-quickstarts
3939
build-command:
4040
current: |
4141
mvn clean install ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.OPTAPLANNER_QUICKSTARTS_BUILD_MVN_OPTS }}

.ci/buildchain-project-dependencies.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: "2.1"
22
dependencies:
3-
- project: kiegroup/optaplanner
4-
- project: kiegroup/optaplanner-quickstarts
3+
- project: apache/incubator-kie-optaplanner
4+
- project: apache/incubator-kie-optaplanner-quickstarts
55
dependencies:
6-
- project: kiegroup/optaplanner
6+
- project: apache/incubator-kie-optaplanner
77
mapping:
88
dependencies:
99
default:

.ci/environments/common/update_quarkus.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set -euo pipefail
2222

2323
mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}"
2424

25-
source <(curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)
25+
source <(curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)
2626

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

.ci/jenkins/Jenkinsfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@Library('jenkins-pipeline-shared-libraries')_
2+
3+
pr_check_script = null
4+
5+
pipeline {
6+
agent {
7+
label 'ubuntu'
8+
}
9+
options {
10+
timestamps()
11+
timeout(time: 360, unit: 'MINUTES')
12+
}
13+
environment {
14+
BUILDCHAIN_PROJECT = 'apache/incubator-kie-optaplanner'
15+
BUILDCHAIN_CONFIG_REPO = 'incubator-kie-optaplanner'
16+
BUILDCHAIN_CONFIG_FILE_PATH = '.ci/buildchain-config.yaml'
17+
18+
ENABLE_SONARCLOUD = 'true'
19+
SONARCLOUD_ANALYSIS_MVN_OPTS = '-Dsonar.projectKey=org.optaplanner:optaplanner'
20+
OPTAPLANNER_BUILD_MVN_OPTS = '-Prun-code-coverage'
21+
}
22+
stages {
23+
stage('Initialize') {
24+
steps {
25+
script {
26+
// load `pr_check.groovy` file from kogito-pipelines:main
27+
dir('kogito-pipelines') {
28+
checkout(githubscm.resolveRepository('incubator-kie-kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds'))
29+
pr_check_script = load 'dsl/scripts/pr_check.groovy'
30+
}
31+
}
32+
}
33+
}
34+
stage('PR check') {
35+
steps {
36+
script {
37+
dir('kogito-pipelines') {
38+
pr_check_script.launch()
39+
}
40+
}
41+
}
42+
}
43+
}
44+
}

.ci/jenkins/Jenkinsfile.deploy

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ import org.kie.jenkins.MavenStagingHelper
77

88
deployProperties = [:]
99

10-
optaplannerRepository = 'optaplanner'
11-
quickstartsRepository = 'optaplanner-quickstarts'
10+
optaplannerRepository = 'incubator-kie-optaplanner'
11+
quickstartsRepository = 'incubator-kie-optaplanner-quickstarts'
1212

1313
imageUtils = null
1414

1515
pipeline {
1616
agent {
17-
label 'kie-rhel8 && docker && kie-mem16g && !built-in'
18-
}
19-
20-
tools {
21-
maven env.BUILD_MAVEN_TOOL
22-
jdk env.BUILD_JDK_TOOL
17+
docker {
18+
image env.AGENT_DOCKER_BUILDER_IMAGE
19+
args env.AGENT_DOCKER_BUILDER_ARGS
20+
}
2321
}
2422

2523
options {
@@ -28,21 +26,13 @@ pipeline {
2826
disableConcurrentBuilds(abortPrevious: true)
2927
}
3028

31-
// parameters {
32-
// For parameters, check into .jenkins/dsl/jobs.groovy file
33-
// }
34-
3529
environment {
36-
// Some generated env is also defined into .jenkins/dsl/jobs.groovy file
37-
3830
OPTAPLANNER_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
3931

40-
MAVEN_OPTS = '-Xms1024m -Xmx4g'
41-
4232
PR_BRANCH_HASH = "${util.generateHash(10)}"
4333

4434
// Maven configuration
45-
MAVEN_DEPLOY_LOCAL_DIR = "${WORKSPACE}/maven_deploy_dir"
35+
MAVEN_DEPLOY_LOCAL_DIR = "/tmp/maven_deploy_dir"
4636
}
4737

4838
stages {
@@ -197,9 +187,6 @@ pipeline {
197187
when {
198188
expression { return shouldStageArtifacts() }
199189
}
200-
tools {
201-
jdk 'kie-jdk11'
202-
}
203190
steps {
204191
script {
205192
// Stage release artifacts
@@ -320,7 +307,7 @@ void checkoutRepo(String repo, String dirName = repo) {
320307
dir(dirName) {
321308
deleteDir()
322309
if (params.PR_TARGET_BRANCH) {
323-
githubscm.checkoutIfExists(repo, getGitAuthor(), getBuildBranch(), 'kiegroup', getFallbackBranch(repo), true)
310+
githubscm.checkoutIfExists(repo, getGitAuthor(), getBuildBranch(), 'apache', getFallbackBranch(repo), true)
324311
} else {
325312
checkout(githubscm.resolveRepository(repo, getGitAuthor(), getBuildBranch(), false))
326313
}
@@ -331,15 +318,15 @@ void checkoutQuickstarts(String dirName = quickstartsRepository) {
331318
dir(dirName) {
332319
deleteDir()
333320
if (params.PR_TARGET_BRANCH) {
334-
githubscm.checkoutIfExists(quickstartsRepository, getGitAuthor(), getBuildBranch(), 'kiegroup', getQuickStartsBranch(), true)
321+
githubscm.checkoutIfExists(quickstartsRepository, getGitAuthor(), getBuildBranch(), 'apache', getQuickStartsBranch(), true)
335322
} else {
336323
checkout(githubscm.resolveRepository(quickstartsRepository, getGitAuthor(), getQuickStartsBranch(), false))
337324
}
338325
}
339326
}
340327

341328
String getFallbackBranch(String repo) {
342-
def repositoryScm = githubscm.getRepositoryScm(repo, 'kiegroup', params.PR_TARGET_BRANCH)
329+
def repositoryScm = githubscm.getRepositoryScm(repo, 'apache', params.PR_TARGET_BRANCH)
343330
return repositoryScm ? params.PR_TARGET_BRANCH : 'main'
344331
}
345332

@@ -452,7 +439,7 @@ boolean shouldDeployToRepository() {
452439
}
453440

454441
boolean isNotTestingBuild() {
455-
return getGitAuthor() == 'kiegroup'
442+
return getGitAuthor() == 'apache'
456443
}
457444

458445
boolean isRelease() {

0 commit comments

Comments
 (0)