Prerequisites
- Confirm Buildkite reports build results to your pull requests as a status check.
- Get access to the Buildkite account you want Gitar to read as. A dedicated account such as
buildkite-integration@yourcompany.comkeeps access working when people leave.
Required token scopes
Setup
1
Create an API access token
- Sign in as the user you want Gitar to read as.
- Go to API Access Tokens.
- Click New API Access Token and name it
Gitar. - Select the organization Gitar should read, and select all nine scopes listed above.
- Copy the token. Buildkite shows it once.
A token carries its user’s access, so it reads the pipelines that user can see.
2
Enter the token in Gitar
- Go to your Gitar organization settings.
- Open Integrations.
- Find Buildkite and click Connect.
- Paste the token into Buildkite API Token.
- Click Connect to save. The card’s button changes to Configure once the token validates.
What Gitar reads
Gitar reads the log of a failing build and passes it to CI failure analysis. It ignores a passing build, and writes nothing back to Buildkite. Results appear as a comment on the pull request. See CI failure analysis.Troubleshooting
Gitar does not comment on a failed build
Gitar does not comment on a failed build
Check the pull request for a Buildkite status check.If there is no status, Buildkite is not reporting to your Git provider. Check that the repository is connected to both your Git provider and Buildkite, and that the pipeline is set up in Buildkite.
The token is rejected, or a call returns a permission error
The token is rejected, or a call returns a permission error
Check the token against all nine scopes above. A token missing one scope connects and then fails on the call that needs it.Check that you created an API Access Token, and that its user has access to the organization the pipeline belongs to.
Log fetching fails on a build that exists
Log fetching fails on a build that exists
Either the token is missing
read_build_logs, or its user cannot see the pipeline. Use a token from a user who can already open that build in Buildkite.Security notes
- Gitar encrypts credentials and stores them in AWS Secrets Manager.
- Every required scope is read-only. Gitar writes nothing to Buildkite.
- Prefer a dedicated user’s token over a personal one, so access survives people leaving.
- To revoke access, delete the token from API Access Tokens.