From aec7226cfbc52a77eb3a56c555392d7c207b8d9b Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 15:16:33 +0200
Subject: [PATCH 01/13] wip
---
Jenkinsfile | 55 +++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 47 insertions(+), 8 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index d2a429d75b8..f2950bd1ead 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,6 +24,45 @@ pipeline {
}
stages {
stage('ASSEMBLY') {
+ agent {
+ kubernetes {
+ cloud 'kubernetes'
+ label "assembly-${env.JOB_BASE_NAME}-${env.BUILD_ID}"
+ defaultContainer 'jnlp'
+ yaml """
+apiVersion: v1
+kind: Pod
+metadata:
+ labels:
+ agent: ap7-ci-build-experiment
+spec:
+ nodeSelector:
+ cloud.google.com/gke-nodepool: agents-n1-standard-32-netssd-stable
+ tolerations:
+ - key: "agents-n1-standard-32-netssd-stable"
+ operator: "Exists"
+ effect: "NoSchedule"
+ containers:
+ - name: maven
+ image: maven:3.8.6-openjdk-11-slim
+ tty: true
+ env:
+ - name: LIMITS_CPU
+ value: 1
+ - name: TZ
+ value: Europe/Berlin
+ - name: DOCKER_HOST
+ value: tcp://localhost:2375
+ resources:
+ limits:
+ cpu: 3000m
+ memory: 60Gi
+ requests:
+ cpu: 3000m
+ memory: 60Gi
+"""
+ }
+ }
when {
expression {
env.BRANCH_NAME == cambpmDefaultBranch() || (changeRequest() && !pullRequest.labels.contains('ci:no-build'))
@@ -35,7 +74,7 @@ pipeline {
}
steps {
cambpmConditionalRetry([
- agentLabel: 'h2_perf32',
+ agentLabel: "assembly-${env.JOB_BASE_NAME}-${env.BUILD_ID}",
suppressErrors: false,
runSteps: {
withVault([vaultSecrets: [
@@ -223,9 +262,9 @@ pipeline {
cambpmConditionalRetry([
agentLabel: 'postgresql_142',
runSteps: {
- cambpmRunMaven('qa/',
- 'clean install -Pwildfly,postgresql,engine-integration-jakarta',
- runtimeStash: true,
+ cambpmRunMaven('qa/',
+ 'clean install -Pwildfly,postgresql,engine-integration-jakarta',
+ runtimeStash: true,
archiveStash: true,
// we need to use JDK 17 for WildFly 27+ + Spring 6
jdkVersion: 'jdk-17-latest')
@@ -268,9 +307,9 @@ pipeline {
cambpmConditionalRetry([
agentLabel: 'postgresql_142',
runSteps: {
- cambpmRunMaven('qa/',
- 'clean install -Pwildfly,postgresql,postgresql-xa,engine-integration-jakarta',
- runtimeStash: true,
+ cambpmRunMaven('qa/',
+ 'clean install -Pwildfly,postgresql,postgresql-xa,engine-integration-jakarta',
+ runtimeStash: true,
archiveStash: true,
// we need to use JDK 17 for WildFly 27+ + Spring 6
jdkVersion: 'jdk-17-latest')
@@ -511,7 +550,7 @@ pipeline {
cambpmConditionalRetry([
agentLabel: 'h2',
runSteps: {
- cambpmRunMaven('qa/',
+ cambpmRunMaven('qa/',
'clean install -Pwildfly-domain,h2,engine-integration-jakarta',
runtimeStash: true,
archiveStash: true,
From ded10f4653489a6e6a7bd7f604e785576f6b7247 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 15:21:34 +0200
Subject: [PATCH 02/13] wip
---
Jenkinsfile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index f2950bd1ead..d307a4ec3f0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -51,8 +51,6 @@ spec:
value: 1
- name: TZ
value: Europe/Berlin
- - name: DOCKER_HOST
- value: tcp://localhost:2375
resources:
limits:
cpu: 3000m
@@ -60,6 +58,10 @@ spec:
requests:
cpu: 3000m
memory: 60Gi
+ workingDir: "/home/work"
+ volumeMounts:
+ - mountPath: /home/work
+ name: workspace-volume
"""
}
}
From 1152567eae33037913eb22f8787b56c532c05c41 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 15:45:11 +0200
Subject: [PATCH 03/13] wip
---
Jenkinsfile | 169 ++++++++++++++++++++++++++--------------------------
1 file changed, 84 insertions(+), 85 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index d307a4ec3f0..0a5f2c5f4ab 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -44,7 +44,7 @@ spec:
effect: "NoSchedule"
containers:
- name: maven
- image: maven:3.8.6-openjdk-11-slim
+ image: maven:3.8.7-eclipse-temurin-17
tty: true
env:
- name: LIMITS_CPU
@@ -75,108 +75,107 @@ spec:
NEXUS_SNAPSHOT_REPOSITORY_ID = cambpmConfig.nexusSnapshotRepositoryId()
}
steps {
- cambpmConditionalRetry([
- agentLabel: "assembly-${env.JOB_BASE_NAME}-${env.BUILD_ID}",
- suppressErrors: false,
- runSteps: {
- withVault([vaultSecrets: [
+ container('maven') {
+ cambpmConditionalRetry([
+ agentLabel : "assembly-${env.JOB_BASE_NAME}-${env.BUILD_ID}",
+ suppressErrors: false,
+ runSteps : {
+ withVault([vaultSecrets: [
[
- path : 'secret/products/cambpm/ci/xlts.dev',
- secretValues: [
- [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'],
- [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']]
+ path : 'secret/products/cambpm/ci/xlts.dev',
+ secretValues: [
+ [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'],
+ [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']]
]]]) {
- cambpmRunMaven('.',
+ cambpmRunMaven('.',
'clean source:jar deploy source:test-jar com.mycila:license-maven-plugin:check -Pdistro,distro-ce,distro-wildfly,distro-webjar,h2-in-memory -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true',
withCatch: false,
- withNpm: true,
- // we use JDK 17 to build the artifacts, as it is required for supporting Spring Boot 3
- // the compiler source and target is set to JDK 8 in the release parents
- jdkVersion: 'jdk-17-latest')
- }
+ withNpm: true)
+ }
- // archive all .jar, .pom, .xml, .txt runtime artifacts + required .war/.zip/.tar.gz for EE pipeline
- // add a new line for each group of artifacts
- cambpmArchiveArtifacts('.m2/org/camunda/**/*-SNAPSHOT/**/*.jar,.m2/org/camunda/**/*-SNAPSHOT/**/*.pom,.m2/org/camunda/**/*-SNAPSHOT/**/*.xml,.m2/org/camunda/**/*-SNAPSHOT/**/*.txt',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*frontend-sources.zip',
- '.m2/org/camunda/**/*-SNAPSHOT/**/license-book*.zip',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-*-assembly*.tar.gz',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*.war',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-engine-rest*.war',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-example-invoice*.war',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-bpm-run-modules-swaggerui-*-run-swaggerui-license-book-json.json')
+ // archive all .jar, .pom, .xml, .txt runtime artifacts + required .war/.zip/.tar.gz for EE pipeline
+ // add a new line for each group of artifacts
+ cambpmArchiveArtifacts('.m2/org/camunda/**/*-SNAPSHOT/**/*.jar,.m2/org/camunda/**/*-SNAPSHOT/**/*.pom,.m2/org/camunda/**/*-SNAPSHOT/**/*.xml,.m2/org/camunda/**/*-SNAPSHOT/**/*.txt',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*frontend-sources.zip',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/license-book*.zip',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-*-assembly*.tar.gz',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*.war',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-engine-rest*.war',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-example-invoice*.war',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-bpm-run-modules-swaggerui-*-run-swaggerui-license-book-json.json')
- cambpmStash("platform-stash-runtime",
- ".m2/org/camunda/**/*-SNAPSHOT/**",
- "**/qa/**,**/*qa*/**,**/*.zip,**/*.tar.gz")
- cambpmStash("platform-stash-archives",
- ".m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.zip,.m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.tar.gz")
- cambpmStash("platform-stash-qa",
- ".m2/org/camunda/bpm/**/qa/**/*-SNAPSHOT/**,.m2/org/camunda/bpm/**/*qa*/**/*-SNAPSHOT/**",
- "**/*.zip,**/*.tar.gz")
+ cambpmStash("platform-stash-runtime",
+ ".m2/org/camunda/**/*-SNAPSHOT/**",
+ "**/qa/**,**/*qa*/**,**/*.zip,**/*.tar.gz")
+ cambpmStash("platform-stash-archives",
+ ".m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.zip,.m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.tar.gz")
+ cambpmStash("platform-stash-qa",
+ ".m2/org/camunda/bpm/**/qa/**/*-SNAPSHOT/**,.m2/org/camunda/bpm/**/*qa*/**/*-SNAPSHOT/**",
+ "**/*.zip,**/*.tar.gz")
- script {
- if (env.BRANCH_NAME == cambpmDefaultBranch()) {
- // CE master triggers EE master
- // otherwise CE PR branch triggers EE PR branch
- eeMainProjectBranch = "cambpm-ee-main/" + cambpmDefaultBranch()
- } else {
- eeMainProjectBranch = params.EE_DOWNSTREAM
- }
+ script {
+ if (env.BRANCH_NAME == cambpmDefaultBranch()) {
+ // CE master triggers EE master
+ // otherwise CE PR branch triggers EE PR branch
+ eeMainProjectBranch = "cambpm-ee-main/" + cambpmDefaultBranch()
+ } else {
+ eeMainProjectBranch = params.EE_DOWNSTREAM
+ }
- // JOB_NAME, e.g.: '7.15/cambpm-ce/cambpm-main/PR-1373'
- // keep leading slash for the absolute project path
- platformVersionDir = "/" + env.JOB_NAME.split('/')[0]
- upstreamProjectName = "/" + env.JOB_NAME
- upstreamBuildNumber = env.BUILD_NUMBER
+ // JOB_NAME, e.g.: '7.15/cambpm-ce/cambpm-main/PR-1373'
+ // keep leading slash for the absolute project path
+ platformVersionDir = "/" + env.JOB_NAME.split('/')[0]
+ upstreamProjectName = "/" + env.JOB_NAME
+ upstreamBuildNumber = env.BUILD_NUMBER
- if (env.BRANCH_NAME == cambpmDefaultBranch() || cambpmWithLabels('webapp-integration', 'all-as', 'h2', 'websphere', 'weblogic', 'jbosseap', 'run', 'spring-boot', 'e2e')) {
- cambpmTriggerDownstream(
- platformVersionDir + "/cambpm-ee/" + eeMainProjectBranch,
- [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
- string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)],
- true, true, true, true
- )
- }
+ if (env.BRANCH_NAME == cambpmDefaultBranch() || cambpmWithLabels('webapp-integration', 'all-as', 'h2', 'websphere', 'weblogic', 'jbosseap', 'run', 'spring-boot', 'e2e')) {
+ cambpmTriggerDownstream(
+ platformVersionDir + "/cambpm-ee/" + eeMainProjectBranch,
+ [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
+ string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)],
+ true, true, true, true
+ )
+ }
- // the sidetrack pipeline should be triggered on daily,
- // or PR builds only, master builds should be excluded.
- // The Sidetrack pipeline contains CRDB and Azure DB stages,
- // triggered with the cockroachdb and sqlserver PR labels.
- if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('all-db', 'cockroachdb', 'sqlserver')) {
- cambpmTriggerDownstream(
- platformVersionDir + "/cambpm-ce/cambpm-sidetrack/${env.BRANCH_NAME}",
- [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
- string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
- )
- }
+ // the sidetrack pipeline should be triggered on daily,
+ // or PR builds only, master builds should be excluded.
+ // The Sidetrack pipeline contains CRDB and Azure DB stages,
+ // triggered with the cockroachdb and sqlserver PR labels.
+ if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('all-db', 'cockroachdb', 'sqlserver')) {
+ cambpmTriggerDownstream(
+ platformVersionDir + "/cambpm-ce/cambpm-sidetrack/${env.BRANCH_NAME}",
+ [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
+ string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
+ )
+ }
- // don't trigger the daily pipeline from a master branch build
- // or if a PR has no relevant labels
- if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('default-build', 'jdk', 'rolling-update', 'migration', 'wildfly', 'all-db', 'h2', 'db2', 'mysql', 'oracle', 'mariadb', 'sqlserver', 'postgresql')) {
- cambpmTriggerDownstream(
- platformVersionDir + "/cambpm-ce/cambpm-daily/${env.BRANCH_NAME}",
- [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
- string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
- )
- }
+ // don't trigger the daily pipeline from a master branch build
+ // or if a PR has no relevant labels
+ if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('default-build', 'jdk', 'rolling-update', 'migration', 'wildfly', 'all-db', 'h2', 'db2', 'mysql', 'oracle', 'mariadb', 'sqlserver', 'postgresql')) {
+ cambpmTriggerDownstream(
+ platformVersionDir + "/cambpm-ce/cambpm-daily/${env.BRANCH_NAME}",
+ [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
+ string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
+ )
+ }
- // only execute on version (default) branch (e.g. master, 7.15)
- if (env.BRANCH_NAME == cambpmDefaultBranch()) {
- cambpmRunMaven('.',
+ // only execute on version (default) branch (e.g. master, 7.15)
+ if (env.BRANCH_NAME == cambpmDefaultBranch()) {
+ cambpmRunMaven('.',
'org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=${WORKSPACE}/staging -DskipStaging=true',
withCatch: false,
withNpm: true)
+ }
}
+ },
+ postFailure : {
+ cambpmPublishTestResult()
+ // archive any heap dumps generated in the target folder
+ cambpmArchiveArtifacts(false, '**/target/*.hprof')
}
- },
- postFailure: {
- cambpmPublishTestResult()
- // archive any heap dumps generated in the target folder
- cambpmArchiveArtifacts(false, '**/target/*.hprof')
- }
- ])
+ ])
+ }
}
}
stage('h2 UNIT, engine IT, webapp IT') {
From 4b1facad9ac865e425faa28aaea2d996026e8432 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 15:51:15 +0200
Subject: [PATCH 04/13] wip
---
Jenkinsfile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index 0a5f2c5f4ab..a6e3f2c947d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -46,6 +46,10 @@ spec:
- name: maven
image: maven:3.8.7-eclipse-temurin-17
tty: true
+ command:
+ - sleep
+ args:
+ - 99d
env:
- name: LIMITS_CPU
value: 1
From 37f28ad2f437dba7a8c1c366d677ecf5d2cd5088 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 15:56:03 +0200
Subject: [PATCH 05/13] wip
---
Jenkinsfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index a6e3f2c947d..60d65d560f4 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -94,7 +94,8 @@ spec:
cambpmRunMaven('.',
'clean source:jar deploy source:test-jar com.mycila:license-maven-plugin:check -Pdistro,distro-ce,distro-wildfly,distro-webjar,h2-in-memory -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true',
withCatch: false,
- withNpm: true)
+ withNpm: true,
+ jdkVersion: null)
}
// archive all .jar, .pom, .xml, .txt runtime artifacts + required .war/.zip/.tar.gz for EE pipeline
From 04d84b367011d87bfae9d6005ff17487ce02673e Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 16:26:44 +0200
Subject: [PATCH 06/13] wip
---
Jenkinsfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 60d65d560f4..928daf40055 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,6 +1,6 @@
// https://github.com/camunda/jenkins-global-shared-library
// https://github.com/camunda/cambpm-jenkins-shared-library
-@Library(['camunda-ci', 'cambpm-jenkins-shared-library']) _
+@Library(['camunda-ci', 'cambpm-jenkins-shared-library@declarative-pod-specs']) _
def failedStageTypes = []
From 5c4ea70557ce055a17d7f84ddd540300842d9ac2 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 17:10:15 +0200
Subject: [PATCH 07/13] wip
---
Jenkinsfile | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 928daf40055..510d100ac09 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -62,10 +62,7 @@ spec:
requests:
cpu: 3000m
memory: 60Gi
- workingDir: "/home/work"
- volumeMounts:
- - mountPath: /home/work
- name: workspace-volume
+ workingDir: "/home/jenkins/agent"
"""
}
}
From c212b6df40a37b1d2c15ea37efb567ba388e2ae0 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Tue, 11 Jul 2023 17:23:44 +0200
Subject: [PATCH 08/13] wip
---
Jenkinsfile | 2 --
1 file changed, 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 510d100ac09..09fe1f8deba 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -51,8 +51,6 @@ spec:
args:
- 99d
env:
- - name: LIMITS_CPU
- value: 1
- name: TZ
value: Europe/Berlin
resources:
From 4c59ce571849247ae136b25a81c0d17d3321b70d Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Wed, 12 Jul 2023 11:56:43 +0200
Subject: [PATCH 09/13] wip
---
Jenkinsfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index 09fe1f8deba..e8a96cc7da5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -61,6 +61,7 @@ spec:
cpu: 3000m
memory: 60Gi
workingDir: "/home/jenkins/agent"
+ runAsUser: 1000
"""
}
}
From 54f41af73d734d958aa93ea6cbf975a44f4297fd Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Wed, 12 Jul 2023 15:13:53 +0200
Subject: [PATCH 10/13] wip
---
parent/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/parent/pom.xml b/parent/pom.xml
index 8ff8772daf0..e6db38e1fba 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -68,8 +68,8 @@
10.0.0
1.12.1
- 17.9.1
- 8.11.0
+ 18.16.1
+ 9.5.1
From 96452db105c7d59e824fcd091f5fb119462e9ce3 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Wed, 12 Jul 2023 17:02:35 +0200
Subject: [PATCH 11/13] wip
---
Jenkinsfile | 194 +++++++++++++++++++++++++---------------------------
1 file changed, 95 insertions(+), 99 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index e8a96cc7da5..69df0a99659 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -61,7 +61,6 @@ spec:
cpu: 3000m
memory: 60Gi
workingDir: "/home/jenkins/agent"
- runAsUser: 1000
"""
}
}
@@ -75,108 +74,105 @@ spec:
NEXUS_SNAPSHOT_REPOSITORY_ID = cambpmConfig.nexusSnapshotRepositoryId()
}
steps {
- container('maven') {
- cambpmConditionalRetry([
- agentLabel : "assembly-${env.JOB_BASE_NAME}-${env.BUILD_ID}",
- suppressErrors: false,
- runSteps : {
- withVault([vaultSecrets: [
- [
- path : 'secret/products/cambpm/ci/xlts.dev',
- secretValues: [
- [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'],
- [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']]
- ]]]) {
+ cambpmConditionalRetry([
+ agentLabel : 'maven',
+ suppressErrors: false,
+ runSteps : {
+ withVault([vaultSecrets: [
+ [
+ path : 'secret/products/cambpm/ci/xlts.dev',
+ secretValues: [
+ [envVar: 'XLTS_REGISTRY', vaultKey: 'registry'],
+ [envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']]
+ ]]]) {
+ cambpmRunMaven('.',
+ 'clean source:jar deploy source:test-jar com.mycila:license-maven-plugin:check -Pdistro,distro-ce,distro-wildfly,distro-webjar,h2-in-memory -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true',
+ withCatch: false,
+ withNpm: true,
+ jdkVersion: null)
+ }
+
+ // archive all .jar, .pom, .xml, .txt runtime artifacts + required .war/.zip/.tar.gz for EE pipeline
+ // add a new line for each group of artifacts
+ cambpmArchiveArtifacts('.m2/org/camunda/**/*-SNAPSHOT/**/*.jar,.m2/org/camunda/**/*-SNAPSHOT/**/*.pom,.m2/org/camunda/**/*-SNAPSHOT/**/*.xml,.m2/org/camunda/**/*-SNAPSHOT/**/*.txt',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*frontend-sources.zip',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/license-book*.zip',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-*-assembly*.tar.gz',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*.war',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-engine-rest*.war',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-example-invoice*.war',
+ '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-bpm-run-modules-swaggerui-*-run-swaggerui-license-book-json.json')
+
+ cambpmStash("platform-stash-runtime",
+ ".m2/org/camunda/**/*-SNAPSHOT/**",
+ "**/qa/**,**/*qa*/**,**/*.zip,**/*.tar.gz")
+ cambpmStash("platform-stash-archives",
+ ".m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.zip,.m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.tar.gz")
+ cambpmStash("platform-stash-qa",
+ ".m2/org/camunda/bpm/**/qa/**/*-SNAPSHOT/**,.m2/org/camunda/bpm/**/*qa*/**/*-SNAPSHOT/**",
+ "**/*.zip,**/*.tar.gz")
+
+ script {
+ if (env.BRANCH_NAME == cambpmDefaultBranch()) {
+ // CE master triggers EE master
+ // otherwise CE PR branch triggers EE PR branch
+ eeMainProjectBranch = "cambpm-ee-main/" + cambpmDefaultBranch()
+ } else {
+ eeMainProjectBranch = params.EE_DOWNSTREAM
+ }
+
+ // JOB_NAME, e.g.: '7.15/cambpm-ce/cambpm-main/PR-1373'
+ // keep leading slash for the absolute project path
+ platformVersionDir = "/" + env.JOB_NAME.split('/')[0]
+ upstreamProjectName = "/" + env.JOB_NAME
+ upstreamBuildNumber = env.BUILD_NUMBER
+
+ if (env.BRANCH_NAME == cambpmDefaultBranch() || cambpmWithLabels('webapp-integration', 'all-as', 'h2', 'websphere', 'weblogic', 'jbosseap', 'run', 'spring-boot', 'e2e')) {
+ cambpmTriggerDownstream(
+ platformVersionDir + "/cambpm-ee/" + eeMainProjectBranch,
+ [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
+ string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)],
+ true, true, true, true
+ )
+ }
+
+ // the sidetrack pipeline should be triggered on daily,
+ // or PR builds only, master builds should be excluded.
+ // The Sidetrack pipeline contains CRDB and Azure DB stages,
+ // triggered with the cockroachdb and sqlserver PR labels.
+ if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('all-db', 'cockroachdb', 'sqlserver')) {
+ cambpmTriggerDownstream(
+ platformVersionDir + "/cambpm-ce/cambpm-sidetrack/${env.BRANCH_NAME}",
+ [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
+ string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
+ )
+ }
+
+ // don't trigger the daily pipeline from a master branch build
+ // or if a PR has no relevant labels
+ if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('default-build', 'jdk', 'rolling-update', 'migration', 'wildfly', 'all-db', 'h2', 'db2', 'mysql', 'oracle', 'mariadb', 'sqlserver', 'postgresql')) {
+ cambpmTriggerDownstream(
+ platformVersionDir + "/cambpm-ce/cambpm-daily/${env.BRANCH_NAME}",
+ [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
+ string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
+ )
+ }
+
+ // only execute on version (default) branch (e.g. master, 7.15)
+ if (env.BRANCH_NAME == cambpmDefaultBranch()) {
cambpmRunMaven('.',
- 'clean source:jar deploy source:test-jar com.mycila:license-maven-plugin:check -Pdistro,distro-ce,distro-wildfly,distro-webjar,h2-in-memory -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true',
+ 'org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=${WORKSPACE}/staging -DskipStaging=true',
withCatch: false,
- withNpm: true,
- jdkVersion: null)
+ withNpm: true)
}
-
- // archive all .jar, .pom, .xml, .txt runtime artifacts + required .war/.zip/.tar.gz for EE pipeline
- // add a new line for each group of artifacts
- cambpmArchiveArtifacts('.m2/org/camunda/**/*-SNAPSHOT/**/*.jar,.m2/org/camunda/**/*-SNAPSHOT/**/*.pom,.m2/org/camunda/**/*-SNAPSHOT/**/*.xml,.m2/org/camunda/**/*-SNAPSHOT/**/*.txt',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*frontend-sources.zip',
- '.m2/org/camunda/**/*-SNAPSHOT/**/license-book*.zip',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-*-assembly*.tar.gz',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-webapp*.war',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-engine-rest*.war',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-example-invoice*.war',
- '.m2/org/camunda/**/*-SNAPSHOT/**/camunda-bpm-run-modules-swaggerui-*-run-swaggerui-license-book-json.json')
-
- cambpmStash("platform-stash-runtime",
- ".m2/org/camunda/**/*-SNAPSHOT/**",
- "**/qa/**,**/*qa*/**,**/*.zip,**/*.tar.gz")
- cambpmStash("platform-stash-archives",
- ".m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.zip,.m2/org/camunda/bpm/**/*-SNAPSHOT/**/*.tar.gz")
- cambpmStash("platform-stash-qa",
- ".m2/org/camunda/bpm/**/qa/**/*-SNAPSHOT/**,.m2/org/camunda/bpm/**/*qa*/**/*-SNAPSHOT/**",
- "**/*.zip,**/*.tar.gz")
-
- script {
- if (env.BRANCH_NAME == cambpmDefaultBranch()) {
- // CE master triggers EE master
- // otherwise CE PR branch triggers EE PR branch
- eeMainProjectBranch = "cambpm-ee-main/" + cambpmDefaultBranch()
- } else {
- eeMainProjectBranch = params.EE_DOWNSTREAM
- }
-
- // JOB_NAME, e.g.: '7.15/cambpm-ce/cambpm-main/PR-1373'
- // keep leading slash for the absolute project path
- platformVersionDir = "/" + env.JOB_NAME.split('/')[0]
- upstreamProjectName = "/" + env.JOB_NAME
- upstreamBuildNumber = env.BUILD_NUMBER
-
- if (env.BRANCH_NAME == cambpmDefaultBranch() || cambpmWithLabels('webapp-integration', 'all-as', 'h2', 'websphere', 'weblogic', 'jbosseap', 'run', 'spring-boot', 'e2e')) {
- cambpmTriggerDownstream(
- platformVersionDir + "/cambpm-ee/" + eeMainProjectBranch,
- [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
- string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)],
- true, true, true, true
- )
- }
-
- // the sidetrack pipeline should be triggered on daily,
- // or PR builds only, master builds should be excluded.
- // The Sidetrack pipeline contains CRDB and Azure DB stages,
- // triggered with the cockroachdb and sqlserver PR labels.
- if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('all-db', 'cockroachdb', 'sqlserver')) {
- cambpmTriggerDownstream(
- platformVersionDir + "/cambpm-ce/cambpm-sidetrack/${env.BRANCH_NAME}",
- [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
- string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
- )
- }
-
- // don't trigger the daily pipeline from a master branch build
- // or if a PR has no relevant labels
- if (env.BRANCH_NAME != cambpmDefaultBranch() && cambpmWithLabels('default-build', 'jdk', 'rolling-update', 'migration', 'wildfly', 'all-db', 'h2', 'db2', 'mysql', 'oracle', 'mariadb', 'sqlserver', 'postgresql')) {
- cambpmTriggerDownstream(
- platformVersionDir + "/cambpm-ce/cambpm-daily/${env.BRANCH_NAME}",
- [string(name: 'UPSTREAM_PROJECT_NAME', value: upstreamProjectName),
- string(name: 'UPSTREAM_BUILD_NUMBER', value: upstreamBuildNumber)]
- )
- }
-
- // only execute on version (default) branch (e.g. master, 7.15)
- if (env.BRANCH_NAME == cambpmDefaultBranch()) {
- cambpmRunMaven('.',
- 'org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=${WORKSPACE}/staging -DskipStaging=true',
- withCatch: false,
- withNpm: true)
- }
- }
- },
- postFailure : {
- cambpmPublishTestResult()
- // archive any heap dumps generated in the target folder
- cambpmArchiveArtifacts(false, '**/target/*.hprof')
}
- ])
-
- }
+ },
+ postFailure : {
+ cambpmPublishTestResult()
+ // archive any heap dumps generated in the target folder
+ cambpmArchiveArtifacts(false, '**/target/*.hprof')
+ }
+ ])
}
}
stage('h2 UNIT, engine IT, webapp IT') {
From 58b965a12721e06e8a16e96d9464fe86607ca8d9 Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Thu, 13 Jul 2023 08:51:00 +0200
Subject: [PATCH 12/13] wip
---
Jenkinsfile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index 69df0a99659..a6a8411c0bb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -78,6 +78,8 @@ spec:
agentLabel : 'maven',
suppressErrors: false,
runSteps : {
+ sh(label: 'GIT: Mark current directory as safe', script: "git config --global --add safe.directory \$PWD")
+
withVault([vaultSecrets: [
[
path : 'secret/products/cambpm/ci/xlts.dev',
From 2eeee4062133c289c6411bdbd64edf978639722e Mon Sep 17 00:00:00 2001
From: tasso94 <3015690+tasso94@users.noreply.github.com>
Date: Thu, 13 Jul 2023 14:13:34 +0200
Subject: [PATCH 13/13] wip
---
Jenkinsfile | 34 +++++++++++++---------------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index a6a8411c0bb..0b8b4b1bacc 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,12 +24,18 @@ pipeline {
}
stages {
stage('ASSEMBLY') {
- agent {
- kubernetes {
- cloud 'kubernetes'
- label "assembly-${env.JOB_BASE_NAME}-${env.BUILD_ID}"
- defaultContainer 'jnlp'
- yaml """
+ when {
+ expression {
+ env.BRANCH_NAME == cambpmDefaultBranch() || (changeRequest() && !pullRequest.labels.contains('ci:no-build'))
+ }
+ }
+ environment {
+ NEXUS_SNAPSHOT_REPOSITORY = cambpmConfig.nexusSnapshotRepository()
+ NEXUS_SNAPSHOT_REPOSITORY_ID = cambpmConfig.nexusSnapshotRepositoryId()
+ }
+ steps {
+ cambpmConditionalRetry([
+ podSpec: """
apiVersion: v1
kind: Pod
metadata:
@@ -61,21 +67,7 @@ spec:
cpu: 3000m
memory: 60Gi
workingDir: "/home/jenkins/agent"
-"""
- }
- }
- when {
- expression {
- env.BRANCH_NAME == cambpmDefaultBranch() || (changeRequest() && !pullRequest.labels.contains('ci:no-build'))
- }
- }
- environment {
- NEXUS_SNAPSHOT_REPOSITORY = cambpmConfig.nexusSnapshotRepository()
- NEXUS_SNAPSHOT_REPOSITORY_ID = cambpmConfig.nexusSnapshotRepositoryId()
- }
- steps {
- cambpmConditionalRetry([
- agentLabel : 'maven',
+""",
suppressErrors: false,
runSteps : {
sh(label: 'GIT: Mark current directory as safe', script: "git config --global --add safe.directory \$PWD")