-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
33 lines (33 loc) · 1.14 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
node {
def mvnHome
def mavenProfiles = ""
def ideTests = false
if (env.JOB_NAME.endsWith("release-ide")) {
mavenProfiles = "-Prelease-ide-composite,deploy-ide-composite"
} else if (env.JOB_NAME.endsWith("release")) {
mavenProfiles = "-Prelease-composite"
} else if (env.JOB_NAME.endsWith("ide-tests")) {
mavenProfiles = "-Pbuild-ide,test-ide"
ideTests = true
}
properties([
[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '30']]
])
stage('Checkout') { // for display purposes
checkout scm
}
stage('Build') {
wrap([$class: 'Xvfb', autoDisplayName: true, debug: false]) {
if (ideTests) {
sh "mutter --replace --sm-disable 2> mutter.err &"
}
// Run the maven build
// don't make the build fail in case of test failures...
sh "./mvnw -Dmaven.test.failure.ignore=true -fae clean verify ${mavenProfiles}"
}
}
stage('Results') {
// ... JUnit archiver will set the build as UNSTABLE in case of test failures
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
}
}