forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
78 lines (68 loc) · 3.43 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
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
#!groovy
node("master") {
milestone()
lock(resource: "${env.BRANCH_NAME}", inversePrecedence: true) {
ansiColor('xterm') {
milestone()
def mvnHome = tool 'mvn'
def mvnJdk8Image = "orientdb/mvn-gradle-zulu-jdk-8"
def mvnJdk7Image = "orientdb/mvn-gradle-zulu-jdk-7"
stage('Source checkout') {
checkout scm
}
try {
// stage('Compile on Java7') {
// docker.image("${mvnJdk7Image}")
// .inside("${env.VOLUMES}") {
// sh "${mvnHome}/bin/mvn --batch-mode -V -U clean compile -Dmaven.test.failure.ignore=true -Dsurefire.useFile=false"
// }
// }
stage('Run tests on Java7') {
docker.image("${mvnJdk7Image}")
.inside("${env.VOLUMES}") {
try {
//skip integration test for now
sh "${mvnHome}/bin/mvn -V -fae clean install -Dsurefire.useFile=false -DskipITs"
sh "${mvnHome}/bin/mvn -f distribution/pom.xml clean"
sh "${mvnHome}/bin/mvn --batch-mode -V deploy -DskipTests -DskipITs"
} finally {
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
}
}
}
// stage('Run QA/Integration tests on Java8') {
// docker.image("${mvnJdk8Image}")
// .inside("${env.VOLUMES}") {
// try {
// sh "${mvnHome}/bin/mvn -f distribution/pom.xml clean install -Pqa"
// } finally {
// junit allowEmptyResults: true, testResults: '**/target/failsafe-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("Downstream projects") {
build job: "orientdb-spatial-multibranch/${env.BRANCH_NAME}", wait: false
//excluded: too long
//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
}
slackSend(color: '#00FF00', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
} catch (e) {
currentBuild.result = 'FAILURE'
slackSend(channel: '#jenkins-failures', color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
throw e;
}
}
}
}