Skip to content

Commit c3b8d3b

Browse files
committed
Add Jenkinsfile
1 parent 79682bf commit c3b8d3b

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

Jenkinsfile

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
pipeline {
2+
agent { label 'hi-speed' }
3+
tools {
4+
jdk 'Oracle JDK 9'
5+
}
6+
options {
7+
ansiColor('xterm')
8+
}
9+
stages {
10+
stage('Build') {
11+
steps {
12+
sh './gradlew --no-daemon clean build'
13+
}
14+
post {
15+
always {
16+
junit '**/build/test-results/**/*.xml'
17+
}
18+
}
19+
}
20+
stage('Publish Artifacts') {
21+
when {
22+
branch 'master'
23+
}
24+
steps {
25+
milestone 1
26+
withCredentials([usernamePassword(credentialsId: '50481102-b416-45bd-8628-bd890c4f0188', usernameVariable: 'ORG_GRADLE_PROJECT_ossrhUsername', passwordVariable: 'ORG_GRADLE_PROJECT_ossrhPassword')]) {
27+
sh './gradlew --no-daemon uploadArchives -x test'
28+
}
29+
}
30+
}
31+
stage('Aggregate Javadoc') {
32+
steps {
33+
sh './gradlew --no-daemon aggregateJavadocs'
34+
}
35+
post {
36+
success {
37+
step([
38+
$class: 'JavadocArchiver',
39+
javadocDir: 'build/docs/javadoc',
40+
keepAll: true
41+
])
42+
}
43+
}
44+
}
45+
stage('Generate User Guide') {
46+
steps {
47+
sh './gradlew --no-daemon asciidoctor'
48+
}
49+
}
50+
stage('Update Website') {
51+
when {
52+
branch 'master'
53+
}
54+
steps {
55+
milestone 2
56+
withCredentials([string(credentialsId: '9f982a37-747d-42bd-abf9-643534f579bd', variable: 'GRGIT_USER')]) {
57+
sh './gradlew --no-daemon --stacktrace gitPublishPush'
58+
}
59+
}
60+
}
61+
stage('Coverage') {
62+
steps {
63+
sh './gradlew --no-daemon -PenableClover clean cloverHtmlReport cloverXmlReport'
64+
}
65+
post {
66+
success {
67+
step([
68+
$class: 'CloverPublisher',
69+
cloverReportDir: 'build/reports/clover',
70+
cloverReportFileName: 'clover.xml'
71+
])
72+
}
73+
}
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)