forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-distributed.groovy
35 lines (27 loc) · 1.19 KB
/
Jenkinsfile-distributed.groovy
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
34
#!groovy
node("master") {
def mvnHome = tool 'mvn'
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8"
stage('Source checkout') {
checkout scm
}
stage('Run distributed test on Java8') {
try {
timeout(time: 180, unit: 'MINUTES') {
docker.image("${mvnJdk8Image}")
.inside("${env.VOLUMES}") {
sh "${mvnHome}/bin/mvn -f ./distributed/pom.xml --batch-mode -V -U -e -Dmaven.test.failure.ignore=true clean package -Dsurefire.useFile=false -DskipTests=false"
}
}
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) {
slackSend(color: '#00FF00', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
} catch (e) {
currentBuild.result = 'FAILURE'
if (currentBuild.previousBuild == null || currentBuild.previousBuild.result != currentBuild.result) {
slackSend(color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
throw e;
}
}
}