# Buildkite

<div class="view-markdown-wrapper">
<ViewMarkdown />
</div>

Run your Shiplight E2E tests in Buildkite and upload the results to [Shiplight Cloud](https://app.shiplight.ai). Buildkite uses the same `shiplight` CLI as every other provider — only the pipeline syntax differs.

## Before you start

- A scaffolded Shiplight test project (`/shiplight init`). See the [CI/CD overview](/local/ci) for how the pieces fit together.
- An org API token from [app.shiplight.ai/api-tokens](https://app.shiplight.ai/api-tokens). Expose it to the job as `SHIPLIGHT_API_TOKEN` via your agent's secret mechanism (e.g. the [`secrets` field](https://buildkite.com/docs/pipelines/security/secrets/buildkite-secrets) or a secrets plugin) — never commit it to the pipeline file.

## Pipeline

Create `.buildkite/pipeline.yml` at your repository root:

```yaml
steps:
  - label: ":test_tube: Shiplight E2E"
    plugins:
      - docker#v5.11.0:
          image: "node:22"
    env:
      CI: "true"
      # SHIPLIGHT_API_TOKEN is provided as a secret, not set here.
    command: |
      curl -fsSL https://bun.sh/install | bash
      export PATH="$HOME/.bun/bin:$PATH"
      bun install
      bun run playwright install --with-deps chromium
      bun run shiplight test
```

## Notes

- `SHIPLIGHT_API_TOKEN` enables completed test report uploads; set it as a CI secret.
- `CI=true` plus `SHIPLIGHT_API_TOKEN` enables the shared Shiplight Cloud action cache. AI-powered actions can self-heal through the Shiplight LLM proxy, and healed locators from passing tests are reused by later runs.
- Install Chromium yourself (`bun run playwright install --with-deps chromium`); no stock image ships it.
- **Failure triage on Buildkite:** classification runs on the server for uploaded runs from any provider, but the optional autofix workflow ([auto-triage](/local/ci#auto-triage-failures)) is GitHub Actions only.
- Project in a subdirectory (e.g. `tests/e2e`)? `cd tests/e2e` as the first line of the `command`.

## Related

- [CI/CD overview](/local/ci) · [Custom setups](/local/ci/custom) · [CLI Reference](/local/cli-reference)
