-
Notifications
You must be signed in to change notification settings - Fork 9
/
Jenkinsfile
71 lines (63 loc) · 2.19 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
#!/usr/bin/env groovy
@Library('github.com/zanata/[email protected]')
def dummyForLibrary = ""
try {
pullRequests.ensureJobDescription()
timestamps {
node {
ansicolor {
// ensure the build can handle at-signs in paths:
dir("@") {
stage('Checkout') {
info.printNode()
notify.started()
checkout scm
}
stage('Install build tools') {
sh "./mvnw --version"
}
stage('Build') {
info.printEnv()
def testReports = '**/target/surefire-reports/TEST-*.xml'
sh """./mvnw -e clean verify \
--batch-mode \
--settings .travis-settings.xml \
--update-snapshots \
-Dmaven.test.failure.ignore \
-DstaticAnalysis \
"""
// step([$class: 'CheckStylePublisher', pattern: '**/target/checkstyle-result.xml', unstableTotalAll:'0'])
// step([$class: 'PmdPublisher', pattern: '**/target/pmd.xml', unstableTotalAll:'0'])
// step([$class: 'FindBugsPublisher', pattern: '**/findbugsXml.xml', unstableTotalAll:'0'])
junit testResults: testReports
// send test coverage data to codecov.io
try {
withCredentials(
[[$class: 'StringBinding',
credentialsId: 'codecov_jgettext',
variable: 'CODECOV_TOKEN']]) {
// NB the codecov script uses CODECOV_TOKEN
sh "curl -s https://codecov.io/bash | bash -s - -K"
}
} catch (InterruptedException e) {
throw e
} catch (hudson.AbortException e) {
throw e
} catch (e) {
echo "[WARNING] Ignoring codecov error: $e"
}
// skip coverage report if unstable
if (currentBuild.result == null) {
step([ $class: 'JacocoPublisher' ])
}
notify.testResults("UNIT")
//sh "curl -s https://codecov.io/bash | bash"
}
}
}
}
}
} catch (e) {
notify.failed()
throw e
}