forked from junit-team/junit5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
77 lines (77 loc) · 1.84 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
pipeline {
agent { label 'hi-speed' }
tools {
jdk 'Oracle JDK 9'
}
options {
ansiColor('xterm')
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Build') {
steps {
sh './gradlew --no-daemon clean build'
}
post {
always {
junit '**/build/test-results/**/*.xml'
}
}
}
stage('Publish Artifacts') {
when {
branch 'master'
}
steps {
milestone 1
withCredentials([usernamePassword(credentialsId: '50481102-b416-45bd-8628-bd890c4f0188', usernameVariable: 'ORG_GRADLE_PROJECT_ossrhUsername', passwordVariable: 'ORG_GRADLE_PROJECT_ossrhPassword')]) {
sh './gradlew --no-daemon uploadArchives -x test'
}
}
}
stage('Aggregate Javadoc') {
steps {
sh './gradlew --no-daemon aggregateJavadocs'
}
post {
success {
step([
$class: 'JavadocArchiver',
javadocDir: 'build/docs/javadoc',
keepAll: true
])
}
}
}
stage('Generate User Guide') {
steps {
sh './gradlew --no-daemon --stacktrace asciidoctor'
}
}
stage('Update Website') {
when {
branch 'master'
}
steps {
milestone 2
withCredentials([string(credentialsId: '9f982a37-747d-42bd-abf9-643534f579bd', variable: 'GRGIT_USER')]) {
sh './gradlew --no-daemon --stacktrace gitPublishPush'
}
}
}
stage('Coverage') {
steps {
sh './gradlew --no-daemon -PenableClover clean cloverHtmlReport cloverXmlReport'
}
post {
success {
step([
$class: 'CloverPublisher',
cloverReportDir: 'build/reports/clover',
cloverReportFileName: 'clover.xml'
])
}
}
}
}
}