forked from junit-team/junit5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
67 lines (67 loc) · 1.85 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
pipeline {
agent { label 'hi-speed' }
tools {
jdk 'Oracle JDK 10'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Build') {
steps {
sh './gradlew --no-daemon clean'
sh './gradlew --no-daemon -PenableJaCoCo build publishToMavenLocal'
sh './gradlew --no-daemon -Dplatform.tooling.support.tests.enabled=true build'
sh './gradlew --no-daemon -PenableJaCoCo jacocoRootReport'
}
post {
always {
junit '**/build/test-results/**/*.xml'
jacoco execPattern: 'build/jacoco/*.exec', classPattern: 'build/jacoco/classes'
archiveArtifacts artifacts: 'build/reports/jacoco/jacocoRootReport/html/**'
}
}
}
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 publish -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'
}
}
}
}
}