-
Notifications
You must be signed in to change notification settings - Fork 38
/
brats.yml.erb
194 lines (181 loc) · 5.69 KB
/
brats.yml.erb
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
<% languages = %w(apt binary dotnet-core go nodejs python ruby staticfile php nginx) %>
<% stacks = {
"apt" => %w(cflinuxfs4),
"binary" => %w(cflinuxfs4 windows),
"dotnet-core" => %w(cflinuxfs4),
"go" => %w(cflinuxfs4),
"nginx" => %w(cflinuxfs4),
"nodejs" => %w(cflinuxfs4),
"php" => %w(cflinuxfs4),
"python" => %w(cflinuxfs4),
"ruby" => %w(cflinuxfs4),
"staticfile" => %w(cflinuxfs4),
} %>
# The intention of this pipeline is to test against the latest LTS platform.
# This is to make sure that even if a buildpack hasn't had changes/released in
# a while, it stills works well with the latest platform out there.
<% tas_version = '4.0' %>
<% tas_pool_name = 'tas_four' %>
---
resource_types:
- name: cron
type: docker-image
source:
repository: cfbuildpacks/cron-resource
- name: cf-space-resource
type: docker-image
source:
repository: cfbuildpacks/cf-space-resource
- name: shepherd
type: registry-image
source:
repository: us-west2-docker.pkg.dev/shepherd-268822/shepherd2/concourse-resource
tag: v1
resources:
- name: nightly-trigger
type: cron
source:
expression: 0 6 * * *
location: {{current-timezone}}
- name: buildpacks-ci
type: git
source:
uri: https://github.com/cloudfoundry/buildpacks-ci
branch: master
- name: env-repo
type: git
source:
uri: git@github.com:cloudfoundry/buildpacks-envs
branch: master
private_key: '((cloudfoundry-buildpacks-envs-deploy-key.private_key))'
- name: shepherd-tas-<%= tas_version %>-environment
type: shepherd
source:
url: https://v2.shepherd.run
service-account-key: ((shepherd-buildpacks-service-account-key))
lease:
namespace: buildpacks
pool:
namespace: official
name: <%= tas_pool_name %>
compatibility-mode: environments-app
- name: shepherd-cf-environment
type: shepherd
source:
url: https://v2.shepherd.run
service-account-key: ((shepherd-buildpacks-service-account-key))
lease:
namespace: buildpacks
pool:
namespace: official
name: cfd
compatibility-mode: environments-app
- name: cf-deployment
type: git
source:
uri: https://github.com/cloudfoundry/cf-deployment
<% languages.each do |language| %>
- name: buildpack-<%= language %>
type: git
webhook_token: ob0aigh3
source:
uri: git@github.com:cloudfoundry/<%= language %>-buildpack.git
private_key: ((cloudfoundry-<%= language %>-buildpack-deploy-key.private_key))
branch: master
<% end %>
jobs:
<% languages.each do |language| %>
- name: brats-<%= language %>-lts
serial: true
public: true
plan:
- in_parallel:
- get: buildpacks-ci
- get: buildpack
resource: buildpack-<%= language %>
- get: nightly-trigger
trigger: true
- do:
- put: shepherd-tas-<%= tas_version %>-environment
params:
action: create
duration: 6h
resource: shepherd-tas-<%= tas_version %>-environment
description: |
Running <%= language %>-buildpack brats-lts job.
- task: create-cf-space
attempts: 5
file: buildpacks-ci/tasks/create-cf-space-toolsmiths/task.yml
input_mapping:
environment: shepherd-tas-<%= tas_version %>-environment
params:
ORG: pivotal
- task: run-brats-cflinuxfs4
file: buildpacks-ci/tasks/<%= language.to_s == 'php' ? 'run-bp-brats-jammy' : 'run-bp-brats' %>/task.yml
attempts: <%= if language == "ruby" then 3 else 1 end %>
params:
CF_STACK: cflinuxfs4
GINKGO_ATTEMPTS: 4
GINKGO_NODES: 6
ensure:
in_parallel:
- put: shepherd-tas-<%= tas_version %>-environment
params:
action: release
resource: shepherd-tas-<%= tas_version %>-environment
- name: brats-<%= language %>-edge
serial: true
public: true
plan:
- do:
- put: shepherd-cf-environment
params:
action: create
duration: 6h
resource: shepherd-cf-environment
description: |
Running <%= language %>-buildpack brats-edge job.
timeout: 6h
- in_parallel:
- get: buildpacks-ci
- get: env-repo
- get: buildpack
resource: buildpack-<%= language %>
- get: nightly-trigger
trigger: true
<% if stacks[language].include?('windows')%>
- get: cf-deployment
- task: redeploy
file: buildpacks-ci/tasks/cf/redeploy/task.yml
input_mapping:
ci: buildpacks-ci
lock: shepherd-cf-environment
params:
DEPLOY_WINDOWS_CELL: true
<% end %>
- in_parallel:
<% stacks[language].each do |stack| %>
- do:
- task: create-cf-space
attempts: 5
file: buildpacks-ci/tasks/cf/create-space/task.yml
params:
DOMAIN: cf-app.com
ORG: pivotal
input_mapping:
ci: buildpacks-ci
lock: shepherd-cf-environment
- task: run-brats-<%= stack %>
file: buildpacks-ci/tasks/<%= language.to_s == 'php' ? 'run-bp-brats-jammy' : 'run-bp-brats' %>/task.yml
input_mapping: {cf-space: space}
params:
CF_STACK: <%= stack %>
GINKGO_ATTEMPTS: 4
GINKGO_NODES: 6
<% end %>
ensure:
put: shepherd-cf-environment
params:
action: release
resource: shepherd-cf-environment
<% end %>