-
Notifications
You must be signed in to change notification settings - Fork 28
/
build-kubo.yml
233 lines (215 loc) · 6.44 KB
/
build-kubo.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
resource_types:
- name: gcs
type: docker-image
source:
repository: frodenas/gcs-resource
- name: bosh-deployment
type: docker-image
source:
repository: cloudfoundry/bosh-deployment-resource
- name: slack-notification
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
resources:
- name: kubo-version
type: semver
source:
driver: gcs
key: versions/kubo-version
json_key: ((gcs-json-key))
bucket: ((kubo-version-bucket))
- name: git-kubo-ci
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-ci
branch: ((kubo-ci-branch))
private_key: ((git-ssh-key.private_key))
- name: git-kubo-deployment
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-deployment.git
branch: ((kubo-deployment.branch))
private_key: ((git-ssh-key.private_key))
ignore_paths:
- 'LICENSE'
- 'NOTICE'
- name: git-kubo-release
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-release.git
branch: ((kubo-release.branch))
private_key: ((git-ssh-key.private_key))
ignore_paths:
- 'ci'
- '*.md'
- 'LICENSE'
- 'NOTICE'
- name: git-kubo-windows-release
type: git
source:
uri: [email protected]:cloudfoundry-incubator/kubo-release-windows.git
branch: ((kubo-release.branch))
private_key: ((git-ssh-key.private_key))
ignore_paths:
- '*.md'
- 'LICENSE'
- 'NOTICE'
- name: director-source-json
type: gcs
source:
json_key: ((gcs-json-key))
bucket: kubo-pipeline-store
versioned_file: source.json
- name: compilation-deployment-default
type: bosh-deployment
source:
deployment: compilation-default
skip_check: true
- name: compilation-deployment-windows
type: bosh-deployment
source:
deployment: compilation-windows
skip_check: true
- name: gcs-kubo-deployment-tarball-untested
type: gcs
source:
json_key: ((gcs-json-key))
bucket: ((kubo-deployment.build-bucket))
regexp: dev-builds/kubo-deployment-(.*).tgz
- name: gcs-kubo-release-tarball-untested
type: gcs
source:
json_key: ((gcs-json-key))
bucket: ((kubo-release.ubuntu-build-bucket))
regexp: dev-builds/kubo-.*-ubuntu-xenial-.*-(.*).tgz
- name: gcs-kubo-windows-release-tarball-untested
type: gcs
source:
json_key: ((gcs-json-key))
bucket: ((kubo-release.windows-build-bucket))
regexp: dev-windows-builds/kubo-.*-windows2019-.*-(.*).tgz
- name: slack-alert
type: slack-notification
source:
url: ((build-alert-slack-url))
jobs:
- name: run-unit-tests-release
plan:
- get: git-kubo-ci
- get: git-kubo-release
trigger: true
- task: run-release-unit-tests
file: git-kubo-ci/tasks/run-release-unit-tests.yml
on_failure: &on_failure_alert
do:
- task: configure-slack-notification
file: git-kubo-ci/tasks/configure-slack-notification.yml
- put: slack-alert
params:
attachments_file: slack-notification/attachments
text: |
Build Failed. https://ci.kubo.sh/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
- name: run-unit-tests-deployment
plan:
- get: git-kubo-ci
- get: git-kubo-deployment
trigger: true
- task: run-deployment-unit-tests
file: git-kubo-ci/tasks/run-deployment-unit-tests.yml
on_failure: *on_failure_alert
- name: build
plan:
- in_parallel:
- get: git-kubo-ci
- get: director-source-json
- get: kubo-version
params:
pre: dev
- get: git-kubo-windows-release
trigger: true
- get: git-kubo-release
passed: [ 'run-unit-tests-release' ]
trigger: true
- get: git-kubo-deployment
passed: [ 'run-unit-tests-deployment' ]
trigger: true
- in_parallel:
- do:
- task: build-kubo-release
file: git-kubo-ci/tasks/build-kubo-release.yml
on_failure: *on_failure_alert
params:
release: kubo
- task: generate-compilation-manifest
file: git-kubo-ci/tasks/generate-compilation-manifest.yml
params:
RELEASE_LIST: "kubo"
stemcell_alias: default
- put: compilation-deployment-default
params:
manifest: compilation-manifest/manifest.yml
source_file: director-source-json/source.json
releases:
- kubo-release/kubo-release-*.tgz
- task: export
file: git-kubo-ci/tasks/export-release.yml
params:
RELEASE_LIST: kubo
stemcell_alias: default
input_mapping:
gcs-source-json: director-source-json
compilation-deployment: compilation-deployment-default
- do:
- task: build-kubo-windows-release
file: git-kubo-ci/tasks/build-kubo-release.yml
on_failure: *on_failure_alert
input_mapping: {git-kubo-release: git-kubo-windows-release}
output_mapping: {kubo-release: kubo-windows-release}
params:
release: kubo-windows
- task: generate-compilation-manifest-windows
file: git-kubo-ci/tasks/generate-compilation-manifest.yml
output_mapping: {compilation-manifest: compilation-manifest-windows}
params:
RELEASE_LIST: kubo-windows
stemcell_alias: windows
- put: compilation-deployment-windows
params:
manifest: compilation-manifest-windows/manifest.yml
source_file: director-source-json/source.json
releases:
- kubo-windows-release/*.tgz
- task: export
file: git-kubo-ci/tasks/export-release.yml
params:
RELEASE_LIST: kubo-windows
stemcell_alias: windows
input_mapping:
gcs-source-json: director-source-json
compilation-deployment: compilation-deployment-windows
output_mapping: {compiled-releases: compiled-releases-windows}
- task: build-kubo-deployment-tarball
file: git-kubo-ci/tasks/build-kubo-deployment-tarball.yml
on_failure: *on_failure_alert
- put: gcs-kubo-release-tarball-untested
attempts: 10
params:
file: compiled-releases/kubo-*.tgz
- put: gcs-kubo-windows-release-tarball-untested
attempts: 10
params:
file: compiled-releases-windows/kubo-*.tgz
- put: gcs-kubo-deployment-tarball-untested
params:
file: kubo-deployment-tarball/kubo-deployment*.tgz
- name: bump-version
plan:
- get: kubo-version
passed: ['build']
trigger: true
- put: kubo-version
attempts: 10
params:
pre: dev