This repository has been archived by the owner on Nov 29, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpipeline-try-anything.yml
275 lines (259 loc) · 8.29 KB
/
pipeline-try-anything.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
---
groups:
- name: release
jobs:
- deploy-try-anything
- name: packages
jobs:
- export-compiled-packages
- import-compiled-packages-preprod
- import-compiled-packages-production
- name: updates
jobs:
- update-try-anything
jobs:
- name: import-compiled-packages-production
public: true
serial: true
plan:
- aggregate:
- {get: pipeline, resource: git-pipeline, trigger: false}
- {get: stemcell, passed: [deploy-try-anything], trigger: true}
- {get: release-redis, passed: [deploy-try-anything], trigger: true}
- {get: compiled-package-redis, passed: [export-compiled-packages], trigger: true}
- task: bosh-export-compiled-packages
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: pipeline, path: .}
- {name: stemcell, path: try-anything/stemcell/}
- {name: release-redis, path: try-anything/releases/redis/}
- {name: compiled-package-redis, path: try-anything/compiled_packages/}
run:
path: ./try-anything/bin/import_compiled_packages.sh
args: []
params:
bosh_target: {{bosh-production-target}}
bosh_username: {{bosh-production-username}}
bosh_password: {{bosh-production-password}}
- name: import-compiled-packages-preprod
public: true
serial: true
plan:
- aggregate:
- {get: pipeline, resource: git-pipeline, trigger: false}
- {get: stemcell, passed: [deploy-try-anything], trigger: true}
- {get: release-redis, passed: [deploy-try-anything], trigger: true}
- {get: compiled-package-redis, passed: [export-compiled-packages], trigger: true}
- task: bosh-export-compiled-packages
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: pipeline, path: .}
- {name: stemcell, path: try-anything/stemcell/}
- {name: release-redis, path: try-anything/releases/redis/}
- {name: compiled-package-redis, path: try-anything/compiled_packages/}
run:
path: ./try-anything/bin/import_compiled_packages.sh
args: []
params:
bosh_target: {{bosh-preprod-target}}
bosh_username: {{bosh-preprod-username}}
bosh_password: {{bosh-preprod-password}}
- name: export-compiled-packages
public: true
serial: true
plan:
- aggregate:
- get: candidate-assets
resource: s3-candidate-assets
passed: [deploy-try-anything]
trigger: false
- {get: pipeline, resource: git-pipeline, trigger: false}
- task: unpack-assets
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: pipeline, path: .}
- {name: candidate-assets}
run:
path: ./staging/bin/unpack_assets.sh
args: ["candidate-assets/pipeline-assets-*.tgz", "staging"]
- task: bosh-export-compiled-packages
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: unpack-assets, path: .}
run:
path: ./try-anything/bin/export_compiled_packages.sh
args: []
params:
bosh_target: {{bosh-try-anything-target}}
bosh_username: {{bosh-try-anything-username}}
bosh_password: {{bosh-try-anything-password}}
- put: compiled-package-redis
params:
from: try-anything/compiled_packages/redis-(.*)-bosh-warden-boshlite-ubuntu-trusty-go_agent-(.*).tgz
to: bosh-warden-boshlite-ubuntu-trusty-go_agent/redis/
- name: deploy-try-anything
public: true
serial: true
serial_groups: [try-anything]
plan:
- aggregate:
- {get: stemcell, trigger: true}
- {get: release-redis, trigger: true}
- {get: pipeline, resource: git-pipeline, trigger: false}
- {get: try-anything-template-changes, trigger: true}
- {get: release-version, trigger: false, params: {bump: patch}}
- task: make-manifest
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: pipeline, path: .}
- {name: stemcell, path: try-anything/stemcell}
- {name: release-redis, path: try-anything/releases/redis}
run: {path: ./try-anything/bin/make_manifest_and_save.sh}
- task: git-add
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: make-manifest}
run:
path: ./make-manifest/try-anything/bin/git-add-stage-changes.sh
args: ["[try-anything] Update manifest & trigger pipeline"]
- put: git-pipeline
params:
repository: git-add/make-manifest
rebase: true
- put: deployment-try-anything
params:
manifest: make-manifest/try-anything/manifests/manifest.yml
releases: [release-redis/*.tgz]
stemcells: [stemcell/*.tgz]
- task: bosh-run-errand-acceptance-tests
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: make-manifest}
run:
path: bosh
args: [-t, {{bosh-try-anything-target}}, -u, {{bosh-try-anything-username}}, -p, {{bosh-try-anything-password}}, -d, make-manifest/try-anything/manifests/manifest.yml, run, errand, acceptance-tests]
- put: release-version
params: {file: release-version/number}
- task: save-deployment-pipeline
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: release-version}
- {name: make-manifest, path: .}
- {name: release-redis}
- {name: stemcell}
run: {path: ./try-anything/bin/save_deployment_pipeline.sh}
- put: s3-candidate-assets
params: {from: save-deployment-pipeline/pipeline-assets-(.*).tgz}
- name: update-try-anything
public: true
serial: true
serial_groups: [try-anything]
plan:
- aggregate:
- {get: pipeline, resource: git-pipeline, trigger: false}
- {get: try-anything-env-changes, trigger: true}
- task: make-manifest
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: pipeline, path: .}
run: {path: ./try-anything/bin/make_manifest_and_save.sh}
- task: git-add
config:
platform: linux
image: {{docker-hub-task-image}}
inputs:
- {name: make-manifest}
run:
path: ./make-manifest/try-anything/bin/git-add-stage-changes.sh
args: ["[try-anything] Update local manifest only"]
- put: git-pipeline
params:
repository: git-add/make-manifest
rebase: true
- put: deployment-try-anything
params:
manifest: make-manifest/try-anything/manifests/manifest.yml
releases: []
stemcells: []
resources:
- name: stemcell
type: bosh-io-stemcell
source:
name: {{bosh-stemcell-name}}
version: {{bosh-stemcell-version}}
- name: release-redis
type: bosh-io-release
source: {repository: cloudfoundry-community/redis-boshrelease}
- name: git-pipeline
type: git
source:
uri: {{pipeline-git-repo}}
branch: {{pipeline-branch}}
private_key: {{github-private-key}}
- name: try-anything-env-changes
type: git
source:
uri: {{pipeline-git-repo}}
branch: {{pipeline-branch}}
private_key: {{github-private-key}}
paths: [try-anything/environment]
- name: try-anything-template-changes
type: git
source:
uri: {{pipeline-git-repo}}
branch: {{pipeline-branch}}
private_key: {{github-private-key}}
paths: [try-anything/templates]
- name: deployment-try-anything
type: bosh-deployment
source:
target: {{bosh-try-anything-target}}
username: {{bosh-try-anything-username}}
password: {{bosh-try-anything-password}}
deployment: redis-try-anything
ignore_ssl: true
- name: release-version
type: semver
source:
bucket: {{aws-pipeline-bucket}}
key: release-version
initial_version: 0.1.0
access_key_id: {{aws-access-key-id}}
secret_access_key: {{aws-secret-access-key}}
region_name: us-east-1
- name: s3-candidate-assets
type: s3
source:
access_key_id: {{aws-access-key-id}}
secret_access_key: {{aws-secret-access-key}}
region_name: {{aws-region-name}}
bucket: {{aws-pipeline-bucket}}
private: true
regexp: pipeline-assets-(.*).tgz
- name: compiled-package-redis
type: s3
source:
access_key_id: {{aws-access-key-id}}
secret_access_key: {{aws-secret-access-key}}
region_name: {{aws-region-name}}
bucket: {{aws-compiled-packages-bucket}}
private: false
regexp: try-anything/compiled_packages/redis-(.*)-bosh-warden-boshlite-ubuntu-trusty-go_agent-(.*).tgz