From 44903d23bb15098c5731476e57552ccf4840f7af Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Wed, 12 May 2021 14:45:49 +0200 Subject: [PATCH] chore(ci): merge engine and webapp unit stages Related to CAM-13484 --- .ci/config/matrices.yaml | 13 +++---- .ci/config/stage-types.yaml | 24 ++++--------- Jenkinsfile | 68 ++++--------------------------------- 3 files changed, 16 insertions(+), 89 deletions(-) diff --git a/.ci/config/matrices.yaml b/.ci/config/matrices.yaml index 9c584af139f..921c6d58425 100644 --- a/.ci/config/matrices.yaml +++ b/.ci/config/matrices.yaml @@ -28,10 +28,8 @@ engine-webapp-unit: - 'sqlserver_2017' - 'sqlserver_2019' stages: - - 'engine-unit' - - 'engine-unit-authorizations' - - 'webapp-unit' - - 'webapp-unit-authorizations' + - 'db-unit' + - 'db-unit-authorizations' engine-rest: stages: - 'engine-rest-unit-jersey-2' @@ -78,11 +76,8 @@ sidetrack-stages: databases: - 'cockroachdb_201' stages: - - 'engine-unit' - - 'engine-unit-authorizations' - - 'webapp-unit' - - 'webapp-unit-authorizations' - - 'sql-scripts' + - 'db-unit' + - 'db-unit-authorizations' - 'upgrade-database' - 'instance-migration' - 'old-engine' diff --git a/.ci/config/stage-types.yaml b/.ci/config/stage-types.yaml index 8f9ce10ff5c..e2105f7a4d4 100644 --- a/.ci/config/stage-types.yaml +++ b/.ci/config/stage-types.yaml @@ -20,9 +20,9 @@ # h2: [INT; OPTIONAL;] # db2: [INT; OPTIONAL;] # sqlserver: [INT; OPTIONAL;] -engine-unit: - directory: 'engine' - command: 'clean test -P' +db-unit: + directory: '.' + command: 'clean test -pl "engine,webapps" -Dskip.frontend.build=true -P' stash: runtimeStash: true labels: @@ -35,25 +35,13 @@ engine-unit: - 'postgresql' - 'cockroachdb' - 'authorizations' -engine-unit-authorizations: - directory: 'engine' - command: 'clean test -PcfgAuthorizationCheckRevokesAlways,' +db-unit-authorizations: + directory: '.' + command: 'clean test -pl "engine,webapps" -Dskip.frontend.build=true -PcfgAuthorizationCheckRevokesAlways,' stash: runtimeStash: true labels: - 'authorizations' -webapp-unit: - directory: 'webapps' - command: 'clean test -Dskip.frontend.build=true -P' - stash: - runtimeStash: true - labels: - - 'default-build' -webapp-unit-authorizations: - directory: 'webapps' - command: 'clean test -Dskip.frontend.build=true -PcfgAuthorizationCheckRevokesAlways,' - stash: - runtimeStash: true sql-scripts: directory: 'distro/sql-script' command: 'install -Pcheck-sql,' diff --git a/Jenkinsfile b/Jenkinsfile index b9c187c4179..0a69a94e91e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,7 +118,7 @@ pipeline { } stage('h2 UNIT, engine IT, webapp IT') { parallel { - stage('engine-UNIT-h2') { + stage('db-UNIT-h2') { when { expression { cambpmWithLabels('h2', 'rolling-update', 'migration', 'all-db', 'default-build', 'authorizations') @@ -128,16 +128,16 @@ pipeline { cambpmConditionalRetry([ agentLabel: 'h2', runSteps: { - cambpmRunMavenByStageType('engine-unit', 'h2') + cambpmRunMavenByStageType('db-unit', 'h2') }, postFailure: { cambpmPublishTestResult() - cambpmAddFailedStageType(failedStageTypes, 'engine-unit') + cambpmAddFailedStageType(failedStageTypes, 'db-unit') } ]) } } - stage('engine-UNIT-authorizations-h2') { + stage('db-UNIT-authorizations-h2') { when { expression { cambpmWithLabels('h2', 'authorizations') @@ -147,67 +147,11 @@ pipeline { cambpmConditionalRetry([ agentLabel: 'h2', runSteps: { - cambpmRunMavenByStageType('engine-unit-authorizations', 'h2') - }, - postFailure: { - cambpmPublishTestResult() - cambpmAddFailedStageType(failedStageTypes, 'engine-unit-authorizations') - } - ]) - } - } - stage('webapp-UNIT-h2') { - when { - expression { - cambpmWithLabels('default-build') - } - } - steps { - cambpmConditionalRetry([ - agentLabel: 'h2', - runSteps: { - cambpmRunMavenByStageType('webapp-unit', 'h2') - }, - postFailure: { - cambpmPublishTestResult() - cambpmAddFailedStageType(failedStageTypes, 'webapp-unit') - } - ]) - } - } - stage('webapp-UNIT-authorizations-h2') { - when { - expression { - cambpmWithLabels('default-build') - } - } - steps { - cambpmConditionalRetry([ - agentLabel: 'h2', - runSteps: { - cambpmRunMavenByStageType('webapp-unit-authorizations', 'h2') - }, - postFailure: { - cambpmPublishTestResult() - cambpmAddFailedStageType(failedStageTypes, 'webapp-unit-authorizations') - } - ]) - } - } - stage('engine-UNIT-historylevel-none') { - when { - expression { - cambpmWithLabels('default-build') - } - } - steps { - cambpmConditionalRetry([ - agentLabel: 'h2', - runSteps: { - cambpmRunMaven('engine/', 'verify -Pcfghistorynone', runtimeStash: true) + cambpmRunMavenByStageType('db-unit-authorizations', 'h2') }, postFailure: { cambpmPublishTestResult() + cambpmAddFailedStageType(failedStageTypes, 'db-unit-authorizations') } ]) }