Skip to content

Commit

Permalink
chore(ci): merge engine and webapp unit stages
Browse files Browse the repository at this point in the history
Related to CAM-13484
  • Loading branch information
yanavasileva authored May 12, 2021
1 parent 0e5d20e commit 44903d2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 89 deletions.
13 changes: 4 additions & 9 deletions .ci/config/matrices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
24 changes: 6 additions & 18 deletions .ci/config/stage-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,'
Expand Down
68 changes: 6 additions & 62 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand All @@ -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')
}
])
}
Expand Down

0 comments on commit 44903d2

Please sign in to comment.