forked from asciidoctor/asciidoctor-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
197 lines (183 loc) · 4.18 KB
/
.gitlab-ci.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
stages:
- infrastructure
- build
- test
- docs
# - reports
# - release
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_JOB_STAGE-$CI_JOB_NAME"
paths:
- $HOME/.gradle
variables:
JDK8_TEST_IMAGE: $CI_REGISTRY/asciidoctor/testing-lab/openjdk8-with-libxss:latest
JDK11_TEST_IMAGE: $CI_REGISTRY/asciidoctor/testing-lab/openjdk11-with-libxss:latest
JDK12_TEST_IMAGE: $CI_REGISTRY/asciidoctor/testing-lab/openjdk12-with-libxss:latest
testrepo:
stage: infrastructure
image: openjdk:8
script: ./gradlew -i --console=plain --no-build-cache :testfixtures-offline-repo:buildOfflineRepositories
artifacts:
paths:
- testfixtures/offline-repo/build/repo/
expire_in: 90min
when: always
except:
- pages
- gh-pages
- tags
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME-$CI_JOB_STAGE-$CI_JOB_NAME"
paths:
- $HOME/.gradle
- testfixtures/offline-repo/build/repo/
jdk8:
stage: build
image: openjdk:8
script: ./gradlew -i -S --console=plain --no-build-cache assemble codenarcAll license
artifacts:
paths:
- .gradle/
- '*/build/'
expire_in: 60min
when: always
except:
- pages
- gh-pages
- tags
jdk11:
stage: build
image: openjdk:11
script: ./gradlew -i -S --console=plain --no-build-cache assemble
artifacts:
paths:
- .gradle/
- '*/build/'
expire_in: 60min
when: always
except:
- pages
- gh-pages
- tags
jdk12:
stage: build
image: openjdk:12
script: ./gradlew -i -S --console=plain --no-build-cache assemble
artifacts:
paths:
- .gradle/
- '*/build/'
expire_in: 60min
when: always
except:
- pages
- gh-pages
- tags
test:integration:
stage: test
image: $JDK8_TEST_IMAGE
# image: openjdk:8
except:
- pages
- gh-pages
- tags
dependencies:
- testrepo
- jdk8
script: ./gradlew -i -s --console=plain --no-build-cache test intTest remoteTest -x asciidoctor-gradle-slides-export:intTest -x asciidoctor-gradle-jvm-slides:intTest
artifacts:
paths:
- '*/build/reports'
- '*/build/jacoco'
expire_in: 10 days
when: on_failure
test:integration_slides:
stage: test
image: $JDK8_TEST_IMAGE
# image: openjdk:8
except:
- pages
- gh-pages
- tags
dependencies:
- testrepo
- jdk8
script: ./gradlew -i -s --console=plain --no-build-cache test asciidoctor-gradle-jvm-slides:intTest asciidoctor-gradle-slides-export:intTest
artifacts:
paths:
- '*/build/reports'
- '*/build/jacoco'
expire_in: 10 days
when: on_failure
test:gradle_7.0.2,7.1.1,7.3.3:
stage: test
image: $JDK11_TEST_IMAGE
except:
- pages
- gh-pages
- tags
dependencies:
- testrepo
- jdk11
script: ./run-compatibility-test-on-ci.sh
artifacts:
paths:
- '*/build/reports'
- '*/build/jacoco'
expire_in: 10 days
when: on_failure
test:gradle_7.4.2,7.5.1:
stage: test
image: $JDK12_TEST_IMAGE
except:
- pages
- gh-pages
- tags
dependencies:
- testrepo
- jdk11
script: ./run-compatibility-test-on-ci.sh
artifacts:
paths:
- '*/build/reports'
- '*/build/jacoco'
expire_in: 10 days
when: on_failure
htmldocs:
stage: docs
image: openjdk:11
dependencies:
- testrepo
- jdk11
script: ./gradlew groovydoc && cd docs && ./gradlew --console=plain asciidoctor
artifacts:
paths:
- '*/build/docs/combined'
#jacoco:
# stage: reports
# image: openjdk:11
# dependencies:
# - test:integration
# - test:gradle_5.0,5.1.1
# except:
# - pages
# - gh-pages
# - tags
# script: ./gradlew --console=plain jacocoRootReport coveralls
#publish:
# stage: release
# image: openjdk:8
# script: ./gradlew -s -i --console=plain --no-build-cache installDocs publishPlugins gitPublishPush -i -Dgradle.publish.key=$GRADLE_PORTAL_KEY -Dgradle.publish.secret=$GRADLE_PORTAL_SECRET -Dorg.ajoberstar.grgit.auth.username=$PAGES_PUBLISH_USER -Dorg.ajoberstar.grgit.auth.password=$PAGES_PUBLISH_KEY -Dorg.ajoberstar.grgit.auth.force=hardcoded
# dependencies:
# - jdk8
# only:
# - release
#
#pages:
# stage: release
# script: ls -la
# artifacts:
# paths:
# - public
# only:
# - pages