-
Notifications
You must be signed in to change notification settings - Fork 302
Expand file tree
/
Copy pathpipeline.yml
More file actions
301 lines (285 loc) · 10.1 KB
/
pipeline.yml
File metadata and controls
301 lines (285 loc) · 10.1 KB
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
env:
BUILDKIT_PROGRESS: plain
steps:
- label: ":spider: Check for link issues"
env:
RAILS_ENV: production
agents:
queue: hosted
soft_fail:
- exit_status: 1
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker-compose#v3.13.0:
run: muffet
shell: false
upload-container-logs: always
mount-buildkite-agent: true
propagate-environment: true
artifact_paths:
- ".buildkite/steps/muffet_results.json"
- label: ":graphql: Check generated code is up to date"
command: bundle exec rake graphql:generate
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker-compose#v3.13.0:
run: app
dependencies: false
- .buildkite/plugins/check-for-changes:
fail_message: "Generated code is out of date. Run `bundle exec rake graphql:generate` and commit the changes."
- label: ":go: Check generated agent CLI docs"
if_changed: pages/agent/cli/help/*.md
command: ./scripts/update-agent-help.sh
agents:
queue: "${AGENT_QUEUE:-hosted-m}"
plugins:
- docker#v5.13.0:
image: "golang:1.24"
- .buildkite/plugins/check-for-changes:
fail_message: "Do not edit agent CLI docs directly - use scripts/update-agent-help.sh"
- label: ":go: Check generated BK CLI docs"
if_changed: pages/platform/cli/*.md
command: ./scripts/update-bkcli-help.sh
agents:
queue: "${AGENT_QUEUE:-hosted-m}"
plugins:
- docker#v5.13.0:
image: "golang:1.25"
- .buildkite/plugins/check-for-changes:
fail_message: "Do not edit BK CLI docs directly - use scripts/update-bkcli-help.sh"
- label: ":test_tube: Check generated agent experiments docs"
if_changed: pages/agent/self_hosted/configure/experiments.md
command: ./scripts/update-agent-experiments.sh
agents:
queue: "${AGENT_QUEUE:-hosted-m}"
plugins:
- docker#v5.13.0:
image: "ruby:3.3"
- .buildkite/plugins/check-for-changes:
fail_message: "Do not edit experiments.md directly - update https://github.com/buildkite/agent/blob/main/EXPERIMENTS.md and use scripts/update-agent-experiments.sh"
- label: ":test_tube: Check generated supported agent versions docs"
if_changed: pages/agent/self_hosted/versions_directory.md
command: ./scripts/update-agent-versions-directory.sh
agents:
queue: "${AGENT_QUEUE:-hosted-m}"
plugins:
- docker#v5.13.0:
image: "ruby:3.3"
- .buildkite/plugins/check-for-changes:
fail_message: "Do not edit versions_directory.md directly - use scripts/update-agent-versions-directory.sh"
- group: "Lint all the things"
key: linting
steps:
- label: ":prettier: Lint assets"
commands:
- yarn
- npm run prettier-check
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker#v5.13.0:
image: "public.ecr.aws/docker/library/node:22-alpine"
- label: ":lint-roller: Linting text and markdown"
agents:
queue: hosted
plugins:
- docker-compose#v3.13.0:
run: vale
config: ./vale/docker-compose.yml
- label: ":lint-roller: Linting for insensitive words"
command: npm run lint -y
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
# Using the plain Node image, instead of the custom doc Dockerfile
# version, is way faster because we don't have to wait for Ruby gems to
# install.
- docker#v5.13.0:
image: "public.ecr.aws/docker/library/node:22-alpine"
- label: "Validate YAML"
command:
- npm run -y validate-agent-attributes-yaml
- npm run -y validate-environment-variables-yaml
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker#v5.13.0:
image: "public.ecr.aws/docker/library/node:22-alpine"
- label: ":lint-roller: :markdown: Linting the Markdown"
command: npm run -y mdlint
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker#v5.13.0:
image: "public.ecr.aws/docker/library/node:22-alpine"
- label: ":snake: Linting markdown files for snake case"
command: npx -y @ls-lint/ls-lint@2.1.0
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker#v5.13.0:
image: "public.ecr.aws/docker/library/node:22-alpine"
- label: ":rspec: RSpec"
depends_on: linting
command: bundle exec rspec
artifact_paths: "log/rspec-*.xml"
key: "rspec"
env:
RAILS_ENV: test
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker-compose#v3.13.0:
run: app
dependencies: false
env:
- BUILDKITE_ANALYTICS_TOKEN
- BUILDKITE_BRANCH
- BUILDKITE_BUILD_ID
- BUILDKITE_BUILD_NUMBER
- BUILDKITE_BUILD_URL
- BUILDKITE_COMMIT
- BUILDKITE_JOB_ID
- BUILDKITE_MESSAGE
- CI
- RAILS_ENV
- label: ":docker: Build image"
key: "assets"
env:
RAILS_ENV: production
agents:
queue: hosted
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- ecr#v2.9.0:
login: true
account-ids: public.ecr.aws
- docker-compose#v3.13.0:
build: app
- label: ":junit: Test Summary"
depends_on: "rspec"
allow_dependency_failure: true
agents:
queue: hosted
plugins:
- bugcrowd/test-summary#v1.11.0:
inputs:
- label: ":rspec: RSpec"
artifact_path: "log/rspec*"
type: junit
formatter:
type: details
context: test-summary
- label: ":robot_face: AI Style Review"
if: build.branch != "main" && build.pull_request.draft != true && !(build.pull_request.labels includes "ai-reviewed")
if_changed: "pages/**/*.md"
agents:
queue: hosted
timeout_in_minutes: 3
soft_fail: true
plugins:
- aws-assume-role-with-web-identity#v1.4.0:
role-arn: arn:aws:iam::445615400570:role/pipeline-buildkite-docs-private
session-tags:
- organization_slug
- organization_id
- pipeline_slug
- build_branch
- aws-ssm#v1.1.0:
parameters:
GITHUB_TOKEN: /pipelines/buildkite/docs-private/github-token
- docker#v5.13.0:
image: "golang:1.24-bookworm"
propagate-environment: true
environment:
- "BUILDKITE_AGENT_ACCESS_TOKEN"
- "BUILDKITE_AGENT_ENDPOINT"
- "BUILDKITE_PULL_REQUEST"
- "GITHUB_TOKEN"
- "GH_TOKEN=${GITHUB_TOKEN}"
mount-buildkite-agent: true
command: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg 2>/dev/null
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update -qq && apt-get install -y -qq gh > /dev/null 2>&1
cd tools/pr-review-agent
go build -buildvcs=false -o pr-review-agent .
./pr-review-agent