forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.yml
317 lines (317 loc) · 8.77 KB
/
pipeline.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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
resource_types:
- name: artifactory-resource
type: docker-image
source:
repository: springio/artifactory-resource
tag: 0.0.3-SNAPSHOT
- name: email
type: docker-image
source:
repository: pcfseceng/email-resource
- name: pull-request
type: docker-image
source:
repository: jtarchie/pr
resources:
- name: git-repo
type: git
source:
uri: ((github-repo))
username: ((github-username))
password: ((github-password))
branch: ((branch))
ignore_paths: ["ci/images/*"]
- name: git-pull-request
type: pull-request
source:
access_token: ((github-access-token))
repo: ((github-repo-name))
base: ((branch))
ignore_paths: ["ci/*"]
- name: ci-images-git-repo
type: git
source:
uri: ((github-repo))
branch: ((branch))
paths: ["ci/images/*"]
- name: spring-boot-ci-image
type: docker-image
source:
repository: ((docker-hub-organization))/spring-boot-ci-image
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: ((branch))
- name: spring-boot-jdk9-ci-image
type: docker-image
source:
repository: ((docker-hub-organization))/spring-boot-jdk9-ci-image
username: ((docker-hub-username))
password: ((docker-hub-password))
tag: ((branch))
- name: artifactory-repo
type: artifactory-resource
source:
uri: ((artifactory-server))
username: ((artifactory-username))
password: ((artifactory-password))
build_name: ((build-name))
- name: email-notification
type: email
source:
smtp:
host: ((email-server))
port: "25"
anonymous: true
skip_ssl_validation: true
from: ((email-from))
to: ((email-to))
jobs:
- name: build-spring-boot-ci-images
plan:
- get: ci-images-git-repo
trigger: true
- put: spring-boot-ci-image
params:
build: ci-images-git-repo/ci/images/spring-boot-ci-image
- put: spring-boot-jdk9-ci-image
params:
build: ci-images-git-repo/ci/images/spring-boot-jdk9-ci-image
- name: build
serial: true
public: true
plan:
- get: spring-boot-ci-image
- get: git-repo
trigger: true
- do:
- task: build-project
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-project.yml
- aggregate:
- task: build-samples
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-samples.yml
- task: build-integration-tests
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-integration-tests.yml
- task: build-deployment-tests
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-deployment-tests.yml
on_failure:
put: email-notification
params:
subject_text: "Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}"
body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!"
- put: artifactory-repo
params: &artifactory-params
repo: libs-snapshot-local
build_number: "${BUILD_ID}"
folder: distribution-repository
build_uri: "https://ci.spring.io/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}"
build_number: "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}"
disable_checksum_uploads: true
artifact_set:
- include:
- "/**/spring-boot-docs-*.zip"
properties:
"zip.type": "docs"
"zip.deployed": "false"
- name: build-pull-requests
serial: true
public: true
plan:
- get: spring-boot-ci-image
- get: git-repo
resource: git-pull-request
trigger: true
version: every
- do:
- put: git-pull-request
params:
path: git-repo
status: pending
- task: build-project
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-project.yml
- aggregate:
- task: build-samples
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-samples.yml
- task: build-integration-tests
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-integration-tests.yml
- task: build-deployment-tests
timeout: 1h30m
image: spring-boot-ci-image
file: git-repo/ci/tasks/build-deployment-tests.yml
on_success:
put: git-pull-request
params:
path: git-repo
status: success
on_failure:
put: git-pull-request
params:
path: git-repo
status: failure
- name: jdk9-build
serial: true
public: true
plan:
- get: spring-boot-jdk9-ci-image
- get: git-repo
trigger: true
- do:
- task: build-project
timeout: 1h30m
image: spring-boot-jdk9-ci-image
file: git-repo/ci/tasks/build-project.yml
- aggregate:
- task: build-samples
timeout: 1h30m
image: spring-boot-jdk9-ci-image
file: git-repo/ci/tasks/build-samples.yml
- task: build-integration-tests
timeout: 1h30m
image: spring-boot-jdk9-ci-image
file: git-repo/ci/tasks/build-integration-tests.yml
- task: build-deployment-tests
timeout: 1h30m
image: spring-boot-jdk9-ci-image
file: git-repo/ci/tasks/build-deployment-tests.yml
on_failure:
put: email-notification
params:
subject_text: "JDK 9 Build failure ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME} / ${BUILD_NAME}"
body_text: "Build ${ATC_EXTERNAL_URL}/teams/${BUILD_TEAM_NAME}/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME} has failed!"
- name: stage-milestone
serial: true
plan:
- get: spring-boot-ci-image
- get: git-repo
trigger: false
- task: stage
image: spring-boot-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: M
- put: artifactory-repo
params:
<<: *artifactory-params
repo: libs-staging-local
- put: git-repo
params:
repository: stage-git-repo
- name: stage-rc
serial: true
plan:
- get: spring-boot-ci-image
- get: git-repo
trigger: false
- task: stage
image: spring-boot-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: RC
- put: artifactory-repo
params:
<<: *artifactory-params
repo: libs-staging-local
- put: git-repo
params:
repository: stage-git-repo
- name: stage-release
serial: true
plan:
- get: spring-boot-ci-image
- get: git-repo
trigger: false
- task: stage
image: spring-boot-ci-image
file: git-repo/ci/tasks/stage.yml
params:
RELEASE_TYPE: RELEASE
- put: artifactory-repo
params:
<<: *artifactory-params
repo: libs-staging-local
- put: git-repo
params:
repository: stage-git-repo
- name: promote-milestone
serial: true
plan:
- get: spring-boot-ci-image
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-milestone]
params:
save_build_info: true
- task: promote
image: spring-boot-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: M
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
- name: promote-rc
serial: true
plan:
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-rc]
params:
save_build_info: true
- task: promote
image: spring-boot-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: RC
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
- name: promote-release
serial: true
plan:
- get: git-repo
trigger: false
- get: artifactory-repo
trigger: false
passed: [stage-release]
params:
save_build_info: true
- task: promote
image: spring-boot-ci-image
file: git-repo/ci/tasks/promote.yml
params:
RELEASE_TYPE: RELEASE
ARTIFACTORY_SERVER: ((artifactory-server))
ARTIFACTORY_USERNAME: ((artifactory-username))
ARTIFACTORY_PASSWORD: ((artifactory-password))
BINTRAY_USERNAME: ((bintray-username))
BINTRAY_PASSWORD: ((bintray-password))
SONATYPE_USERNAME: ((sonatype-username))
SONATYPE_PASSWORD: ((sonatype-password))
BINTRAY_SUBJECT: ((bintray-subject))
BINTRAY_REPO: ((bintray-repo))
groups:
- name: "Build"
jobs: ["build", "jdk9-build"]
- name: "Release"
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release"]
- name: "CI Images"
jobs: ["build-spring-boot-ci-images"]
- name: "Build Pull Requests"
jobs: ["build-pull-requests"]