Before you start, set up Trunk CI for Buildkite,
install the Trunk CI GitHub App, and
store your organization’s API token from
Settings → Organization → General
as a Buildkite secret named
TRUNK_API_TOKEN. The pipeline’s remote must be
on github.com.Give your steps keys
Add akey: to every step you might want skipped. A step without one always
runs.
Start with a dry run
Add this step to each pull request pipeline that runs your tests and checks. Trunk records verdicts, and your pipeline is unchanged.if: and agents: as your other pull request steps.
Add the plugin to your upload step
When you are ready to skip steps, pipe your pipeline through the filter on its way to upload:- Pin an exact release, v0.1.1 or later.
- Don’t pass
--no-interpolationtobuildkite-agent pipeline upload. trigger:steps are never skipped. Matrix andparallelism:legs skip together.
Mark steps that must never be skipped
Trunk can’t tell which Buildkite steps are required to merge. Before you turn on enforcement, list them inexclude-keys:
Pipelines with no upload step (step mode)
Pipelines with no upload step (step mode)
If your pipeline lives in Buildkite’s settings editor, put the plugin on the
step itself with
mode: step. The step needs a key:. It saves less,
because the agent has already started, and a skipped step reports as passed.All options
All options
Troubleshooting
Setdebug: true to print what the plugin asked for and the plan it got back.
- Nothing is skipped. Check the repository is Enforced, the steps have a
key:, and Trunk has a couple of days of builds for them. - The plan request returns 404. The pipeline’s remote doesn’t match a repository in your Trunk organization with CI data.
baseShais null on a pull request build. Fetch the target branch before the upload step.