forked from cloudfoundry/disaster-recovery-acceptance-tests
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipeline.yml
209 lines (197 loc) · 6.33 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
---
resource_types:
- name: pull-request
type: docker-image
source:
repository: teliaoss/github-pr-resource
- name: vault
type: docker-image
source:
repository: wfernandes/vault-resource
tag: latest
- name: pcf-pool
type: docker-image
source:
repository: cftoolsmiths/toolsmiths-envs-resource
resources:
- name: cf-deployment-concourse-tasks
type: git
source:
branch: main
uri: https://github.com/cloudfoundry/cf-deployment-concourse-tasks.git
tag_filter: v12.*
- name: cf-deployment
type: git
source:
uri: https://github.com/cloudfoundry/cf-deployment.git
branch: main
- name: bbr-binary-release
type: github-release
source:
owner: cloudfoundry-incubator
repository: bosh-backup-and-restore
access_token: ((github.access_token))
- name: disaster-recovery-acceptance-tests
type: pull-request
source:
repository: cloudfoundry-incubator/disaster-recovery-acceptance-tests
access_token: ((github.access_token))
disable_forks: false
- name: cf-deployment-env
icon: pool
type: pcf-pool
source:
api_token: ((toolsmiths.api_token))
hostname: environments.toolsmiths.cf-app.com
pool_name: cf-deployment
- name: cryogenics-concourse-tasks
type: git
source:
uri: [email protected]:pivotal/cryogenics-concourse-tasks.git
private_key: ((github.ssh_key))
branch: main
jobs:
- name: set-pipeline
plan:
- get: disaster-recovery-acceptance-tests
trigger: true
version: every
- set_pipeline: drats
file: disaster-recovery-acceptance-tests/ci/pipelines/drats/pipeline.yml
- name: claim-cf-deployment
plan:
- in_parallel:
- get: disaster-recovery-acceptance-tests
passed: [set-pipeline]
trigger: true
version: every
- put: cf-deployment-env
params:
action: claim
- get: cryogenics-concourse-tasks
- name: deploy-backup-restore-components
plan:
- in_parallel:
- get: disaster-recovery-acceptance-tests
version: every
passed: [claim-cf-deployment]
trigger: true
- get: cf-deployment-env
passed: [claim-cf-deployment]
trigger: true
version: every
- get: cf-deployment
- get: cf-deployment-concourse-tasks
- put: disaster-recovery-acceptance-tests
params:
path: disaster-recovery-acceptance-tests
status: pending
context: drats
- task: deploy-backup-restore-components
file: cf-deployment-concourse-tasks/bosh-deploy/task.yml
input_mapping:
toolsmiths-env: cf-deployment-env
ops-files: cf-deployment
params:
OPS_FILES: >
operations/scale-to-one-az.yml
operations/use-compiled-releases.yml
operations/backup-and-restore/enable-backup-restore.yml
operations/enable-nfs-volume-service.yml
operations/experimental/disable-interpolate-service-bindings.yml
operations/experimental/enable-traffic-to-internal-networks.yml
operations/experimental/enable-smb-volume-service.yml
operations/backup-and-restore/skip-backup-restore-droplets-and-packages.yml
- task: bosh-run-errand-nfsbrokerpush
file: cf-deployment-concourse-tasks/run-errand/task.yml
input_mapping:
toolsmiths-env: cf-deployment-env
params:
ERRAND_NAME: nfsbrokerpush
- task: bosh-run-errand-smbbrokerpush
file: cf-deployment-concourse-tasks/run-errand/task.yml
input_mapping:
toolsmiths-env: cf-deployment-env
params:
ERRAND_NAME: smbbrokerpush
- name: run-drats-tests
plan:
- in_parallel:
- get: cf-deployment
passed: [deploy-backup-restore-components]
- get: disaster-recovery-acceptance-tests
trigger: true
passed: [deploy-backup-restore-components]
version: every
- get: cf-deployment-env
passed: [deploy-backup-restore-components]
trigger: true
version: every
- get: bbr-binary-release
- get: cryogenics-concourse-tasks
- load_var: pooled-env
file: cf-deployment-env/metadata
format: json
- task: unit-tests
file: disaster-recovery-acceptance-tests/ci/tasks/unit-tests/task.yml
params:
GITHUB_SSH_KEY: ((github.ssh_key))
on_failure:
put: disaster-recovery-acceptance-tests
params:
path: disaster-recovery-acceptance-tests
status: failure
context: drats
- task: update-integration-config
file: disaster-recovery-acceptance-tests/ci/tasks/update-integration-config/task.yml
input_mapping:
integration-configs: disaster-recovery-acceptance-tests
params:
SYSTEM_DOMAIN: ((.:pooled-env.name)).cf-app.com
JUMPBOX_PRIVATE_KEY: ((.:pooled-env.bosh.jumpbox_private_key))
CREDHUB_CLIENT: ((.:pooled-env.bosh.credhub_client))
CREDHUB_SECRET: ((.:pooled-env.bosh.credhub_secret))
CREDHUB_CA_CERT: ((.:pooled-env.bosh.credhub_ca_cert))
CREDHUB_SERVER: ((.:pooled-env.bosh.credhub_server))
CREDHUB_PROXY: ((.:pooled-env.bosh.bosh_all_proxy))
BOSH_ENVIRONMENT: ((.:pooled-env.bosh.bosh_environment))
BOSH_CA_CERT: ((.:pooled-env.bosh.bosh_ca_cert))
BOSH_ALL_PROXY: ((.:pooled-env.bosh.bosh_all_proxy))
BOSH_CLIENT: ((.:pooled-env.bosh.bosh_client))
BOSH_CLIENT_SECRET: ((.:pooled-env.bosh.bosh_client_secret))
- task: acceptance-tests
file: disaster-recovery-acceptance-tests/ci/tasks/drats-with-integration-config/task.yml
privileged: true
input_mapping:
drats-integration-config: updated-integration-configs
params:
CONFIG_FILE_PATH: ci/integration_config.json
CF_DIAL_TIMEOUT: 300
on_failure:
put: disaster-recovery-acceptance-tests
params:
path: disaster-recovery-acceptance-tests
status: failure
context: drats
on_success:
do:
- put: disaster-recovery-acceptance-tests
params:
path: disaster-recovery-acceptance-tests
status: success
context: drats
- load_var: pr-url
file: disaster-recovery-acceptance-tests/.git/resource/url
- task: merge-pr
file: cryogenics-concourse-tasks/github-automation/merge-pr/task.yml
input_mapping:
source-repo: disaster-recovery-acceptance-tests
params:
DELETE: TRUE
AUTHOR: dependabot
GH_TOKEN: ((github.access_token))
PR_REF: ((.:pr-url))
- put: cf-deployment-env
params:
action: unclaim
env_file: cf-deployment-env/metadata