Skip to content

Commit 84692c7

Browse files
committed
Split slow and integration tests
Fix typo in integration test commit status message.
1 parent 64ee7a1 commit 84692c7

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.jenkins/Jenkinsfile

+30-3
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,51 @@ pipeline {
112112
}
113113
}
114114
parallel {
115-
stage('Run slow unit tests and integration tests') {
115+
stage('Run slow unit tests') {
116116
when {
117117
anyOf {
118+
branch 'master'
118119
branch 'hotfix-*'
119120
branch 'release-*'
120121
branch 'development'
121122
}
122123
}
123124
steps {
124-
setBuildStatus "Integration tests", "Integration tests #${env.BUILD_NUMBER} have started...", 'PENDING'
125+
setBuildStatus "Slow tests", "Slow tests for #${env.BUILD_NUMBER} have started...", 'PENDING'
125126
sh 'mvn -B test -Dgroups=SlowTest'
127+
}
128+
post {
129+
always {
130+
junit testResults: '**/target/surefire-reports/*.xml'
131+
}
132+
success {
133+
setBuildStatus "Slow tests", "Slow tests for build #${env.BUILD_NUMBER} have passed.", 'SUCCESS'
134+
}
135+
failure {
136+
setBuildStatus "Slow tests", "Slow tests for build #${env.BUILD_NUMBER} failed.", 'ERROR'
137+
}
138+
unstable {
139+
setBuildStatus "Slow tests", "Slow tests for build #${env.BUILD_NUMBER} failed.", 'FAILURE'
140+
}
141+
}
142+
}
143+
stage('Run integration tests') {
144+
when {
145+
anyOf {
146+
branch 'master'
147+
branch 'hotfix-*'
148+
branch 'release-*'
149+
branch 'development'
150+
}
151+
}
152+
steps {
153+
setBuildStatus "Integration tests", "Integration tests for build #${env.BUILD_NUMBER} have started...", 'PENDING'
126154
lock('database/' + testdbUrl) {
127155
sh 'mvn -B verify -DskipUnitTests'
128156
}
129157
}
130158
post {
131159
always {
132-
junit testResults: '**/target/surefire-reports/*.xml'
133160
junit testResults: '**/target/failsafe-reports/*.xml'
134161
}
135162
success {

0 commit comments

Comments
 (0)