forked from ArcadeData/arcadedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
50 lines (41 loc) · 1.73 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
#!/usr/bin/env groovy
/*
* Copyright (c) 2018 - Arcade Analytics LTD (https://arcadeanalytics.com)
*/
node {
try {
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '10', artifactNumToKeepStr: '10', daysToKeepStr: '10', numToKeepStr: '10')), disableConcurrentBuilds()])
cleanWs()
stage('checkout') {
checkout scm
}
docker.image('adoptopenjdk:11-jdk-hotspot').inside(' -u root -v /home/player/volumes/jenkins_home/.m2:/root/.m2 -v /usr/bin/git:/usr/bin/git ') {
stage('check java') {
sh "./mvnw -version"
}
stage('build') {
try {
sh "./mvnw -Pdocker -fae --quiet -B clean install "
} catch (err) {
throw err
} finally {
// junit '**/surefire-reports/**/*.xml'
// step([$class : 'JacocoPublisher',
// execPattern : '**/**.exec',
// classPattern : '**/classes',
// sourcePattern: '**/src/main/java'])
}
}
stage('build downstream') {
// build job: "trader/${env.BRANCH_NAME}", wait: false
//master branch hardcoded
build job: "trader/master", wait: false
}
}
googlechatnotification url: 'id:chat_jenkins_id', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})"
} catch (e) {
currentBuild.result = 'FAILURE'
googlechatnotification url: 'id:chat_jenkins_id', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})\n${e}"
throw e
}
}