forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.PREV
125 lines (109 loc) · 5.35 KB
/
Jenkinsfile.PREV
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!groovy
node("master") {
milestone()
lock(resource: "${env.BRANCH_NAME}", inversePrecedence: true) {
milestone()
def mvnHome = tool 'mvn'
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8"
def mvnIBMJdkImage = "orientdb/jenkins-slave-ibm-jdk-8"
stage('Source checkout') {
checkout scm
}
try {
stage('Run tests on Java8') {
docker.image("${mvnJdk8Image}")
.inside("${env.VOLUMES}") {
try {
sh "${mvnHome}/bin/mvn --batch-mode -V clean install -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false"
sh "${mvnHome}/bin/mvn --batch-mode -V deploy -DskipTests"
} finally {
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
}
}
}
stage('Run tests on IBM Java8') {
docker.image("${mvnIBMJdkImage}")
.inside("${env.VOLUMES}") {
try {
sh "${mvnHome}/bin/mvn --batch-mode -V test -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false"
} finally {
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
}
}
}
stage("Run downstream projects") {
build job: "orientdb-spatial-multibranch/${env.BRANCH_NAME}", wait: false
build job: "orientdb-enterprise-multibranch/${env.BRANCH_NAME}", wait: false
build job: "orientdb-security-multibranch/${env.BRANCH_NAME}", wait: false
build job: "orientdb-neo4j-importer-multibranch/${env.BRANCH_NAME}", wait: false
build job: "orientdb-teleporter-multibranch/${env.BRANCH_NAME}", wait: false
build job: "spring-data-orientdb-multibranch/${env.BRANCH_NAME}", wait: false
}
stage('Run CI tests on java8') {
timeout(time: 300, unit: 'MINUTES') {
docker.image("${mvnJdk8Image}")
.inside("${env.VOLUMES}") {
sh "${mvnHome}/bin/mvn --batch-mode -V -U -e -Dmaven.test.failure.ignore=true -Dstorage.diskCache.bufferSize=4096 -Dorientdb.test.env=ci clean package -Dsurefire.useFile=false"
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
}
}
}
stage('Publish Javadoc') {
docker.image("${mvnJdk8Image}")
.inside("${env.VOLUMES}") {
sh "${mvnHome}/bin/mvn javadoc:aggregate"
sh "rsync -ra --stats ${WORKSPACE}/target/site/apidocs/ -e ${env.RSYNC_JAVADOC}/${env.BRANCH_NAME}/"
}
}
// stage('Run crash tests on java8') {
//
// try {
// timeout(time: 240, unit: 'MINUTES') {
// docker.image("${mvnJdk8Image}")
// .inside("${env.VOLUMES}") {
// sh "${mvnHome}/bin/mvn -f ./server/pom.xml --batch-mode -V -U -e -Dmaven.test.failure.ignore=true clean test-compile failsafe:integration-test -Dsurefire.useFile=false"
// }
// }
//
// } catch (e) {
// currentBuild.result = 'FAILURE'
//
// slackSend(color: 'bad', message: "FAILED crash tests: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
// } finally {
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
//
// }
// }
//
// 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"
//
// }
// }
// } catch (e) {
// currentBuild.result = 'FAILURE'
//
// slackSend(color: 'bad', message: "FAILED distributed tests: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
// } finally {
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
//
// }
//
// }
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;
}
}
}