switchroom 0.13.1 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/agent-scheduler/index.js +2 -2
  2. package/dist/auth-broker/index.js +2 -2
  3. package/dist/cli/switchroom.js +21 -18
  4. package/dist/host-control/main.js +2 -2
  5. package/dist/vault/approvals/kernel-server.js +2 -2
  6. package/dist/vault/broker/server.js +2 -2
  7. package/package.json +1 -1
  8. package/telegram-plugin/dist/gateway/gateway.js +54 -22
  9. package/telegram-plugin/gateway/boot-probes.ts +13 -6
  10. package/telegram-plugin/gateway/gateway.ts +71 -122
  11. package/telegram-plugin/hooks/silent-end-interrupt-stop.mjs +5 -1
  12. package/telegram-plugin/silent-end.ts +56 -0
  13. package/telegram-plugin/tests/boot-probes.test.ts +26 -2
  14. package/telegram-plugin/tests/silent-end.test.ts +69 -0
  15. package/skills/buildkite-agent-infrastructure/SKILL.md +0 -321
  16. package/skills/buildkite-agent-infrastructure/agents/openai.yaml +0 -6
  17. package/skills/buildkite-agent-infrastructure/assets/buildkite-icon-large.png +0 -0
  18. package/skills/buildkite-agent-infrastructure/assets/buildkite-icon-small.png +0 -0
  19. package/skills/buildkite-agent-infrastructure/references/audit-logging.md +0 -87
  20. package/skills/buildkite-agent-infrastructure/references/graphql-mutations.md +0 -690
  21. package/skills/buildkite-agent-infrastructure/references/instance-shapes.md +0 -38
  22. package/skills/buildkite-agent-infrastructure/references/pipeline-templates.md +0 -73
  23. package/skills/buildkite-agent-infrastructure/references/self-hosted-agents.md +0 -137
  24. package/skills/buildkite-agent-infrastructure/references/sso-saml.md +0 -92
  25. package/skills/buildkite-agent-runtime/SKILL.md +0 -509
  26. package/skills/buildkite-agent-runtime/agents/openai.yaml +0 -6
  27. package/skills/buildkite-agent-runtime/assets/buildkite-icon-large.png +0 -0
  28. package/skills/buildkite-agent-runtime/assets/buildkite-icon-small.png +0 -0
  29. package/skills/buildkite-agent-runtime/references/flag-reference.md +0 -417
  30. package/skills/buildkite-agent-runtime/references/patterns-and-recipes.md +0 -555
  31. package/skills/buildkite-api/SKILL.md +0 -308
  32. package/skills/buildkite-api/agents/openai.yaml +0 -6
  33. package/skills/buildkite-api/assets/buildkite-icon-large.png +0 -0
  34. package/skills/buildkite-api/assets/buildkite-icon-small.png +0 -0
  35. package/skills/buildkite-api/references/graphql-reference.md +0 -195
  36. package/skills/buildkite-api/references/patterns.md +0 -44
  37. package/skills/buildkite-api/references/webhooks.md +0 -161
  38. package/skills/buildkite-cli/SKILL.md +0 -397
  39. package/skills/buildkite-cli/agents/openai.yaml +0 -6
  40. package/skills/buildkite-cli/assets/buildkite-icon-large.png +0 -0
  41. package/skills/buildkite-cli/assets/buildkite-icon-small.png +0 -0
  42. package/skills/buildkite-cli/references/command-reference.md +0 -181
  43. package/skills/buildkite-migration/SKILL.md +0 -195
  44. package/skills/buildkite-pipelines/SKILL.md +0 -481
  45. package/skills/buildkite-pipelines/agents/openai.yaml +0 -6
  46. package/skills/buildkite-pipelines/assets/buildkite-icon-large.png +0 -0
  47. package/skills/buildkite-pipelines/assets/buildkite-icon-small.png +0 -0
  48. package/skills/buildkite-pipelines/examples/basic-pipeline.yml +0 -24
  49. package/skills/buildkite-pipelines/examples/optimized-pipeline.yml +0 -100
  50. package/skills/buildkite-pipelines/references/advanced-patterns.md +0 -286
  51. package/skills/buildkite-pipelines/references/retry-and-error-codes.md +0 -131
  52. package/skills/buildkite-pipelines/references/step-types-reference.md +0 -225
  53. package/skills/buildkite-secure-delivery/SKILL.md +0 -182
  54. package/skills/buildkite-secure-delivery/agents/openai.yaml +0 -6
  55. package/skills/buildkite-secure-delivery/assets/buildkite-icon-large.png +0 -0
  56. package/skills/buildkite-secure-delivery/assets/buildkite-icon-small.png +0 -0
  57. package/skills/buildkite-secure-delivery/references/oidc-cloud-providers.md +0 -83
  58. package/skills/buildkite-secure-delivery/references/package-publishing.md +0 -100
  59. package/skills/buildkite-test-engine/SKILL.md +0 -256
  60. package/skills/buildkite-test-engine/agents/openai.yaml +0 -6
  61. package/skills/buildkite-test-engine/assets/buildkite-icon-large.png +0 -0
  62. package/skills/buildkite-test-engine/assets/buildkite-icon-small.png +0 -0
  63. package/skills/buildkite-test-engine/examples/bktec-splitting.yml +0 -16
  64. package/skills/buildkite-test-engine/examples/collector-pipeline.yml +0 -11
  65. package/skills/buildkite-test-engine/references/collectors.md +0 -198
  66. package/skills/buildkite-test-engine/references/splitting-examples.md +0 -93
@@ -1,481 +0,0 @@
1
- ---
2
- name: buildkite-pipelines
3
- description: >
4
- Use when the user is authoring or editing `.buildkite/pipeline.yml` — the
5
- declarative CI/CD configuration for Buildkite. Covers step types, caching,
6
- parallelism, annotations, retry, dynamic pipelines, matrix builds, plugins,
7
- notifications, artifacts, and concurrency in pipeline YAML.
8
- Triggers on natural phrasings including: "Help me write a pipeline.",
9
- "Can you parallel steps?", "Let's add retry.", "I'd like to add caching.",
10
- "Let's add annotations.", "Let's show test failures in the build page.",
11
- "yo, how do i matrix build", "pls only run tests when code changes",
12
- "yo, how do i only run tests when code changes", and typo'd variants like
13
- "write a pipeline", "add annotations", "set up dnamic pipelines".
14
- Also fires on indirect signals like "my pipeline.yml is a mess",
15
- "the build is slow", "tests run in serial when they shouldn't".
16
- Also fires on mentions of the `.buildkite/` directory, `pipeline.yml`,
17
- step types (command, wait, block, trigger, group, input), `if_changed`,
18
- `notify`, `concurrency`, plugin blocks, matrix steps, or general
19
- Buildkite CI configuration.
20
- Do NOT use when the user is invoking `buildkite-agent <subcommand>` inside
21
- a running step — that's `buildkite-agent-runtime`. In particular, if the
22
- user's message begins with "Inside a Buildkite step," that is the
23
- hard-trigger prefix for `buildkite-agent-runtime`, NOT this skill — even
24
- if the message also mentions annotations, artifacts, step attributes, or
25
- pipeline upload. The distinguishing rule is: authoring `pipeline.yml` =
26
- this skill; calling the `buildkite-agent` binary from inside a running
27
- job = `buildkite-agent-runtime`. Do NOT use for terminal-driven `bk` CLI
28
- operations — that's `buildkite-cli`. Do NOT use for direct REST/GraphQL
29
- API calls — that's `buildkite-api`.
30
- ---
31
-
32
- # Buildkite Pipelines
33
-
34
- Pipeline YAML is the core of Buildkite CI/CD. This skill covers writing, optimizing, and troubleshooting `.buildkite/pipeline.yml` — step types, caching, parallelism, annotations, retry, dynamic pipelines, matrix builds, plugins, notifications, artifacts, and concurrency.
35
-
36
- ## Quick Start
37
-
38
- Create `.buildkite/pipeline.yml` in the repository root:
39
-
40
- ```yaml
41
- steps:
42
- - label: ":hammer: Tests"
43
- command: "npm test"
44
- artifact_paths: "coverage/**/*"
45
-
46
- - wait
47
-
48
- - label: ":rocket: Deploy"
49
- command: "scripts/deploy.sh"
50
- branches: "main"
51
- ```
52
-
53
- Set the pipeline's initial command in Buildkite to upload this file:
54
-
55
- ```yaml
56
- steps:
57
- - label: ":pipeline: Upload"
58
- command: buildkite-agent pipeline upload
59
- ```
60
-
61
- The agent reads `.buildkite/pipeline.yml` and uploads the steps to Buildkite for execution.
62
-
63
- Buildkite looks for `.buildkite/pipeline.yml` by default. Override the path with `buildkite-agent pipeline upload path/to/other.yml`.
64
-
65
- > For creating pipelines programmatically, see the **buildkite-api** skill.
66
- > For agent and queue setup, see the **buildkite-agent-infrastructure** skill.
67
-
68
- ## Step Types
69
-
70
- | Type | Purpose | Minimal syntax |
71
- |------|---------|---------------|
72
- | **command** | Run a shell command | `- command: "make test"` |
73
- | **wait** | Block until all previous steps pass | `- wait` |
74
- | **block** | Pause for manual approval | `- block: ":shipit: Release"` |
75
- | **trigger** | Start a build on another pipeline | `- trigger: "deploy-pipeline"` |
76
- | **group** | Visually group steps (collapsible) | `- group: "Tests"` with nested `steps:` |
77
- | **input** | Collect user input before continuing | `- input: "Release version"` with `fields:` |
78
-
79
- For detailed attributes and advanced examples of each step type, see `references/step-types-reference.md`.
80
-
81
- ## Caching
82
-
83
- Caching dependencies is the single highest-impact optimization. Use the cache plugin with manifest-based invalidation:
84
-
85
- ```yaml
86
- steps:
87
- - label: ":nodejs: Test"
88
- command: "npm ci && npm test"
89
- plugins:
90
- - cache#v1.8.1:
91
- paths:
92
- - "node_modules/"
93
- manifest: "package-lock.json"
94
- ```
95
-
96
- The cache key derives from the manifest file hash. When `package-lock.json` changes, the cache rebuilds.
97
-
98
- **Hosted agents** also support a built-in `cache` key (no plugin needed):
99
-
100
- ```yaml
101
- steps:
102
- - label: ":nodejs: Test"
103
- command: "npm ci && npm test"
104
- cache:
105
- paths:
106
- - "node_modules/"
107
- key: "v1-deps-{{ checksum 'package-lock.json' }}"
108
- ```
109
-
110
- > Hosted agent setup and instance shapes are covered by the **buildkite-agent-infrastructure** skill.
111
-
112
- ## Fast-Fail and Non-Blocking Steps
113
-
114
- Cancel remaining jobs immediately when any job fails:
115
-
116
- ```yaml
117
- steps:
118
- - label: ":rspec: Tests"
119
- command: "bundle exec rspec"
120
- cancel_on_build_failing: true
121
- ```
122
-
123
- Use `soft_fail` for steps that should not block the build (security scans, linting, coverage):
124
-
125
- ```yaml
126
- steps:
127
- - label: ":shield: Security Scan"
128
- command: "scripts/security-scan.sh"
129
- soft_fail:
130
- - exit_status: 1
131
- ```
132
-
133
- A soft-failed step shows as a warning in the UI but does not fail the build. Combine with `continue_on_failure: true` on a wait step to let downstream steps run regardless.
134
-
135
- ## Parallelism and Dependencies
136
-
137
- ### Parallel execution
138
-
139
- Steps at the same level run in parallel by default. Use `parallelism` to fan out a single step:
140
-
141
- ```yaml
142
- steps:
143
- - label: ":rspec: Tests %n"
144
- command: "bundle exec rspec"
145
- parallelism: 10
146
- ```
147
-
148
- This creates 10 parallel jobs. Each receives `BUILDKITE_PARALLEL_JOB` (0-9) and `BUILDKITE_PARALLEL_JOB_COUNT` (10) as environment variables for splitting work.
149
-
150
- > For intelligent test splitting based on timing data, see the **buildkite-test-engine** skill.
151
-
152
- ### Explicit dependencies
153
-
154
- Use `depends_on` to express step-level dependencies without `wait`:
155
-
156
- ```yaml
157
- steps:
158
- - label: "Build"
159
- key: "build"
160
- command: "make build"
161
-
162
- - label: "Unit Tests"
163
- depends_on: "build"
164
- command: "make test-unit"
165
-
166
- - label: "Integration Tests"
167
- depends_on: "build"
168
- command: "make test-integration"
169
- ```
170
-
171
- Unit and integration tests run in parallel after build completes — no `wait` step needed.
172
-
173
- ## Annotations
174
-
175
- Surface build results directly on the build page using `buildkite-agent annotate`. Supports Markdown and HTML.
176
-
177
- ```yaml
178
- steps:
179
- - label: ":test_tube: Tests"
180
- command: |
181
- if ! make test 2>&1 | tee test-output.txt; then
182
- buildkite-agent annotate --style "error" --context "test-failures" < test-output.txt
183
- exit 1
184
- fi
185
- buildkite-agent annotate "All tests passed :white_check_mark:" --style "success" --context "test-results"
186
- ```
187
-
188
- | Flag | Default | Description |
189
- |------|---------|-------------|
190
- | `--style` | `default` | Visual style: `default`, `info`, `warning`, `error`, `success` |
191
- | `--context` | random | Unique ID — reusing a context replaces the annotation |
192
- | `--append` | `false` | Append to existing annotation with same context |
193
-
194
- Link to uploaded artifacts in annotations:
195
-
196
- ```yaml
197
- - command: |
198
- buildkite-agent artifact upload "coverage/*"
199
- buildkite-agent annotate --style "info" 'Coverage: <a href="artifact://coverage/index.html">view report</a>'
200
- ```
201
-
202
- ## Retry
203
-
204
- ### Automatic retry
205
-
206
- Retry transient failures by exit status:
207
-
208
- ```yaml
209
- steps:
210
- - label: ":hammer: Build"
211
- command: "make build"
212
- retry:
213
- automatic:
214
- - exit_status: -1 # Agent lost
215
- limit: 2
216
- - exit_status: 143 # SIGTERM (spot instance termination)
217
- limit: 2
218
- - exit_status: 255 # Timeout or SSH failure
219
- limit: 2
220
- - exit_status: "*" # Any non-zero exit
221
- limit: 1
222
- ```
223
-
224
- ### Manual retry
225
-
226
- Control whether manual retries are allowed:
227
-
228
- ```yaml
229
- retry:
230
- manual:
231
- allowed: false
232
- reason: "Deployment steps cannot be retried"
233
- ```
234
-
235
- For comprehensive exit code tables and retry strategy recommendations, see `references/retry-and-error-codes.md`.
236
-
237
- ## Dynamic Pipelines
238
-
239
- Generate pipeline steps at runtime based on repository state. Upload generated YAML with `buildkite-agent pipeline upload`:
240
-
241
- ```yaml
242
- steps:
243
- - label: ":pipeline: Generate"
244
- command: |
245
- .buildkite/generate-pipeline.sh | buildkite-agent pipeline upload
246
- ```
247
-
248
- For debugging, upload the generated YAML as an artifact before piping to upload:
249
-
250
- ```yaml
251
- steps:
252
- - label: ":pipeline: Generate"
253
- command: |
254
- .buildkite/generate-pipeline.sh | tee generated-pipeline.yml
255
- buildkite-agent artifact upload generated-pipeline.yml
256
- cat generated-pipeline.yml | buildkite-agent pipeline upload
257
- ```
258
-
259
- Keep dynamically generated pipelines under **~500 steps** for optimal UI and processing performance. For larger monorepos, use orchestrator pipelines with trigger steps to spawn child pipelines.
260
-
261
- Example generator script that runs tests only for changed services:
262
-
263
- ```bash
264
- #!/bin/bash
265
- set -euo pipefail
266
- CHANGED=$(git diff --name-only HEAD~1)
267
- cat <<YAML
268
- steps:
269
- YAML
270
- for dir in services/*/; do
271
- svc=$(basename "$dir")
272
- if echo "$CHANGED" | grep -q "^services/$svc/"; then
273
- cat <<YAML
274
- - label: ":test_tube: $svc"
275
- command: "cd services/$svc && make test"
276
- YAML
277
- fi
278
- done
279
- ```
280
-
281
- For advanced generator patterns (Python, monorepo, multi-stage), see `references/advanced-patterns.md`.
282
-
283
- ## Conditional Execution
284
-
285
- ### Step-level conditions
286
-
287
- Use `if` to conditionally run steps based on build state:
288
-
289
- ```yaml
290
- steps:
291
- - label: ":rocket: Deploy"
292
- command: "scripts/deploy.sh"
293
- if: build.branch == "main" && build.message !~ /\[skip deploy\]/
294
- ```
295
-
296
- For the full list of condition expressions, see [Conditionals](https://buildkite.com/docs/pipelines/configure/conditionals.md).
297
-
298
- **`[skip ci]` gotcha:** Buildkite only checks the HEAD commit message for `[skip ci]` / `[ci skip]`. If the tag is in an earlier commit in a multi-commit push, the build still triggers.
299
-
300
- ### Directory-based step filtering (if_changed)
301
-
302
- Skip steps when relevant files haven't changed. Only applied by the Buildkite agent when uploading a pipeline. See https://buildkite.com/docs/pipelines/configure/dynamic-pipelines/if-changed.md.
303
-
304
- ```yaml
305
- steps:
306
- - label: ":nodejs: Frontend tests"
307
- command: "npm test"
308
- if_changed:
309
- - "src/frontend/**"
310
- - "package.json"
311
- ```
312
-
313
- For exclude patterns and monorepo configurations, see `references/advanced-patterns.md`.
314
-
315
- For large monorepos, use the [Sparse Checkout plugin](https://github.com/buildkite-plugins/sparse-checkout-buildkite-plugin) to check out only `.buildkite/` for the upload step — dramatically faster pipeline uploads.
316
-
317
- ### Conditionally running plugins
318
-
319
- Step-level `if` does **not** prevent plugins from executing. Wrap steps in a `group` to skip plugins entirely:
320
-
321
- ```yaml
322
- steps:
323
- - group: ":docker: Build"
324
- if: build.env("DOCKER_PASSWORD") != null
325
- steps:
326
- - label: "Build image"
327
- command: "docker build -t myapp ."
328
- plugins:
329
- - docker-login#v2.1.0:
330
- username: myuser
331
- password-env: DOCKER_PASSWORD
332
- ```
333
-
334
- ## Matrix Builds
335
-
336
- Run the same step across multiple configurations:
337
-
338
- ```yaml
339
- steps:
340
- - label: "Test {{matrix.ruby}} on {{matrix.os}}"
341
- command: "bundle exec rake test"
342
- matrix:
343
- setup:
344
- ruby:
345
- - "3.2"
346
- - "3.3"
347
- os:
348
- - "ubuntu"
349
- - "alpine"
350
- adjustments:
351
- - with:
352
- ruby: "3.2"
353
- os: "alpine"
354
- skip: true # Known incompatible
355
- ```
356
-
357
- Valid properties inside each `adjustments` entry: `with`, `skip`, `soft_fail`, `env`. The `agents:` key is **not valid** inside `adjustments` — Buildkite rejects the pipeline with "agents is not a valid property on the matrix.adjustments configuration". To route matrix combinations to different queues (e.g., Linux vs Windows agents), use separate steps or a dynamic pipeline generator.
358
-
359
- ## Plugins
360
-
361
- Add capabilities with 3-line YAML blocks. Pin versions for reproducibility:
362
-
363
- ```yaml
364
- plugins:
365
- - docker-compose#v5.5.0:
366
- run: app
367
- config: docker-compose.ci.yml
368
- ```
369
-
370
- | Plugin | Purpose |
371
- |--------|---------|
372
- | `cache#v1.8.1` | Dependency caching with manifest-based invalidation |
373
- | `docker#v5.12.0` | Run steps inside a Docker container |
374
- | `docker-compose#v5.5.0` | Build and run with Docker Compose |
375
- | `artifacts#v1.9.4` | Download artifacts between steps |
376
- | `test-collector#v2.0.0` | Upload test results to Test Engine |
377
-
378
- Always pin plugin versions (e.g., `docker#v5.12.0` not `docker#v5`). Unpinned versions can break builds when plugins release new major versions.
379
-
380
- For **private organizational plugins**, use full Git URLs — the shorthand syntax only works for public plugins:
381
-
382
- ```yaml
383
- plugins:
384
- - ssh://git@github.com/my-org/my-plugin.git#v1.0.0:
385
- config: value
386
- ```
387
-
388
- ## Notifications and Artifacts
389
-
390
- Add pipeline-level `notify:` above `steps:` to send Slack, email, or webhook notifications on build state changes. See [Notifications](https://buildkite.com/docs/pipelines/configure/notifications.md) for syntax.
391
-
392
- ### Artifact upload and download
393
-
394
- Upload artifacts from steps, download in later steps:
395
-
396
- ```yaml
397
- steps:
398
- - label: "Build"
399
- command: "make build"
400
- artifact_paths: "dist/**/*"
401
-
402
- - wait
403
-
404
- - label: "Package"
405
- command: |
406
- buildkite-agent artifact download "dist/*" .
407
- make package
408
- ```
409
-
410
- When using artifacts in a Docker build, download artifacts before starting the Docker build since `buildkite-agent` is not available inside the container:
411
-
412
- ```yaml
413
- steps:
414
- - label: "Docker build"
415
- command: |
416
- buildkite-agent artifact download "dist/*" .
417
- docker build -t myapp .
418
- ```
419
-
420
- ## Concurrency
421
-
422
- Limit parallel execution of steps sharing a resource. Always pair `concurrency` with `concurrency_group` — without a group name, the limit is silently ignored.
423
-
424
- ```yaml
425
- steps:
426
- - label: ":rocket: Deploy"
427
- command: "scripts/deploy.sh"
428
- concurrency: 1
429
- concurrency_group: "deploy/production"
430
- concurrency_method: "eager"
431
- ```
432
-
433
- Use `concurrency_method: "eager"` (next available) for independent jobs like deploys. Use the default `"ordered"` (FIFO) when execution order matters. Set `priority` (default `0`, higher = first) to control which queued jobs run next.
434
-
435
- For full concurrency configuration options, see [Controlling Concurrency](https://buildkite.com/docs/pipelines/configure/workflows/controlling-concurrency.md).
436
-
437
- > For triggering, watching, and debugging pipelines from the terminal, see the **buildkite-cli** skill.
438
-
439
- ## Common Mistakes
440
-
441
- | Mistake | What happens | Fix |
442
- |---------|-------------|-----|
443
- | Missing `wait` between dependent steps | Steps run in parallel, second step fails because first hasn't finished | Add `- wait` or use `depends_on:` |
444
- | Using only `wait` steps for all dependencies | Valid but non-idiomatic; `wait` blocks ALL prior steps, making it impossible to run independent steps in parallel | Give named steps a `key:` and use `depends_on: "key"` to express fine-grained dependencies; reserve `wait` for unconditional barriers |
445
- | No `plugins:` in pipeline for package install steps | Dependencies reinstalled from scratch on every build, slowing builds and inflating costs | Add `cache` plugin (or the built-in `cache:` key for hosted agents) to cache `node_modules/`, `.gradle/`, etc. See the Caching section above |
446
- | Using step-level `if` to skip plugins | Plugins still execute (they run before `if` is evaluated) | Wrap in a `group` with the `if` condition |
447
- | Not pinning plugin versions | Builds break when plugin releases breaking change | Always use full semver: `plugin#v1.2.3` |
448
- | Forgetting `concurrency_group` with `concurrency` | `concurrency` is ignored without a group name | Always pair `concurrency` with `concurrency_group` |
449
- | `artifact_paths` glob doesn't match output | Artifacts silently not uploaded, downstream steps fail | Test glob pattern locally; use `**/*` for nested directories |
450
- | Hardcoding parallel job split logic | Uneven test distribution, one slow job blocks the build | Use `parallelism: N` with timing-based splitting via Test Engine |
451
- | Inline secrets in pipeline YAML | Secrets visible in build logs and Buildkite UI | Use cluster secrets or agent environment hooks |
452
- | Using `retry.automatic` with `exit_status: "*"` and high limit | Genuine bugs retry repeatedly, wasting compute | Target specific exit codes; keep wildcard limit at 1 |
453
- | Using `agents:` inside `matrix.adjustments` | Pipeline upload fails: "agents is not a valid property on the matrix.adjustments configuration" | Remove `agents:` from `adjustments`; use separate steps per platform or a dynamic pipeline generator for per-combination queue routing |
454
- | Build fails but all visible steps passed | A trigger step started a child pipeline that failed, or a step was cancelled rather than unblocked | Check the triggered pipeline's build status; inspect block steps for cancellations |
455
- | Pipeline upload fails with no clear error | YAML syntax error or agent-side issue not shown in build logs | Validate YAML locally; check agent logs on the host machine for detailed upload errors; run `buildkite-agent pipeline upload --debug` |
456
- | Fork builds enabled on public pipelines | Contributors can modify `pipeline.yml` to extract secrets | Disable fork builds in pipeline settings for public repos; use a separate pipeline for external PRs with no secret access |
457
- | Docker Compose steps produce artifacts but agent can't find them | Files created inside containers are invisible to the host agent | Mount the working directory as a volume in `docker-compose.yml` so container outputs are visible for `artifact_paths:` |
458
- | Dynamic pipeline generates 1000+ steps | UI becomes slow, pipeline processing degrades | Keep generated pipelines under ~500 steps; use orchestrator pipelines with trigger steps for larger monorepos |
459
-
460
- ## Additional Resources
461
-
462
- ### Reference Files
463
- - **`references/step-types-reference.md`** — Detailed attribute tables for all step types
464
- - **`references/advanced-patterns.md`** — Dynamic pipeline generators, matrix adjustments, monorepo patterns, multi-stage pipelines
465
- - **`references/retry-and-error-codes.md`** — Comprehensive exit code table, retry strategies by failure type
466
-
467
- ### Examples
468
- - **`examples/basic-pipeline.yml`** — Minimal working pipeline (test, wait, deploy)
469
- - **`examples/optimized-pipeline.yml`** — Full-featured pipeline with caching, parallelism, annotations, retry, artifacts, and notifications
470
-
471
- > For migrating pipelines from other CI systems, see the **buildkite-migration** skill.
472
-
473
- ## Further Reading
474
-
475
- - [Buildkite Docs for LLMs](https://buildkite.com/docs/llms.txt)
476
- - [Defining pipeline steps](https://buildkite.com/docs/pipelines/configure/defining-steps.md)
477
- - [Step types reference](https://buildkite.com/docs/pipelines/configure/step-types.md)
478
- - [Pipeline upload](https://buildkite.com/docs/agent/v3/cli-pipeline.md)
479
- - [Conditionals](https://buildkite.com/docs/pipelines/configure/conditionals.md)
480
- - [Managing pipeline secrets](https://buildkite.com/docs/pipelines/security/secrets/managing.md)
481
- - [Pipeline design best practices](https://buildkite.com/docs/pipelines/best-practices/pipeline-design-and-structure.md)
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Buildkite Pipelines"
3
- short_description: "Pipeline YAML, steps, plugins, and dynamic pipelines"
4
- icon_small: "./assets/buildkite-icon-small.png"
5
- icon_large: "./assets/buildkite-icon-large.png"
6
- brand_color: "#00D974"
@@ -1,24 +0,0 @@
1
- # Minimal Buildkite pipeline — test, wait, deploy.
2
- # Place this file at .buildkite/pipeline.yml in the repository root.
3
- #
4
- # Prerequisites:
5
- # - Pipeline initial command set to: buildkite-agent pipeline upload
6
- # - Agent available with access to the repository
7
-
8
- steps:
9
- - label: ":hammer: Tests"
10
- command: "npm test"
11
- retry:
12
- automatic:
13
- - exit_status: -1
14
- limit: 2
15
- - exit_status: 143
16
- limit: 2
17
-
18
- - wait
19
-
20
- - label: ":rocket: Deploy"
21
- command: "scripts/deploy.sh"
22
- branches: "main"
23
- concurrency: 1
24
- concurrency_group: "deploy/production"
@@ -1,100 +0,0 @@
1
- # Full-featured Buildkite pipeline demonstrating:
2
- # - Dependency caching (cache plugin)
3
- # - Parallel test execution
4
- # - Build annotations for visibility
5
- # - Targeted automatic retry
6
- # - Artifact passing between stages
7
- # - Manual deploy gate
8
- # - Concurrency control
9
- # - Slack notifications on failure
10
- #
11
- # Place this file at .buildkite/pipeline.yml in the repository root.
12
-
13
- notify:
14
- - slack:
15
- channels:
16
- - "#ci-alerts"
17
- message: "Build {{build.number}} failed on {{build.branch}}"
18
- if: build.state == "failed"
19
-
20
- steps:
21
- # Stage 1: Build with caching
22
- - label: ":hammer: Build"
23
- key: "build"
24
- command: |
25
- npm ci
26
- npm run build
27
- plugins:
28
- - cache#v1.8.1:
29
- paths:
30
- - "node_modules/"
31
- manifest: "package-lock.json"
32
- artifact_paths:
33
- - "dist/**/*"
34
- retry:
35
- automatic:
36
- - exit_status: -1
37
- limit: 2
38
- - exit_status: 143
39
- limit: 2
40
-
41
- # Stage 2: Parallel tests (run after build)
42
- - label: ":rspec: Tests %n"
43
- depends_on: "build"
44
- command: |
45
- buildkite-agent artifact download "dist/*" .
46
- npm test -- --shard=$((BUILDKITE_PARALLEL_JOB + 1))/$BUILDKITE_PARALLEL_JOB_COUNT
47
- parallelism: 4
48
- plugins:
49
- - cache#v1.8.1:
50
- paths:
51
- - "node_modules/"
52
- manifest: "package-lock.json"
53
- - test-collector#v2.0.0:
54
- files: "tmp/junit-*.xml"
55
- format: "junit"
56
- artifact_paths:
57
- - "coverage/**/*"
58
- retry:
59
- automatic:
60
- - exit_status: -1
61
- limit: 2
62
- - exit_status: 143
63
- limit: 2
64
-
65
- - label: ":eslint: Lint"
66
- depends_on: "build"
67
- command: "npm run lint"
68
- plugins:
69
- - cache#v1.8.1:
70
- paths:
71
- - "node_modules/"
72
- manifest: "package-lock.json"
73
- soft_fail: true
74
-
75
- - wait
76
-
77
- # Stage 3: Annotate results
78
- - label: ":memo: Annotate"
79
- command: |
80
- buildkite-agent artifact download "coverage/**/*" .
81
- buildkite-agent annotate --style "success" --context "coverage" \
82
- "Coverage report: <a href=\"artifact://coverage/index.html\">view</a>"
83
-
84
- # Stage 4: Deploy gate + deploy
85
- - block: ":shipit: Deploy to production?"
86
- branches: "main"
87
-
88
- - label: ":rocket: Deploy"
89
- command: |
90
- buildkite-agent artifact download "dist/*" .
91
- scripts/deploy.sh
92
- branches: "main"
93
- concurrency: 1
94
- concurrency_group: "deploy/production"
95
- concurrency_method: "eager"
96
- retry:
97
- automatic: false
98
- manual:
99
- allowed: true
100
- reason: "Review logs before retrying deployment"