Buildkite Quickstart
Getting Started
You can use the analytics test uploader within your Buildkite workflows to upload test your test results.
The trunk analytics test uploader currently only supports Linux x64. If you have another use case, please get in touch with support at https://slack.trunk.io. For the best results, you'll need to validate that your test invocation doesn't use cached test results and doesn't automatically retry failing tests.
Create a Buildkite workflow that runs the tests you want to monitor. In order for us to use the results, these tests must produces a test report in JUnit XML format.
Find your organization slug. First you'll need to navigate to app.trunk.io. Once logged in, you will be automatically redirected to a URL similar to https://app.trunk.io/my-org-slug/repo-owner/repo-name/ci-analytics.
Store your trunk token in a secret named
TRUNK_TOKEN
. You can find your Trunk token by navigating to Settings → Manage Organization → Organization API Token and clicking "View."Update your Buildkite workflow to download and run the test uploader binary after you've run your tests:
Sample Buildkite workflow steps:
The trunk-analytics-uploader
binary should be run from the repository root. If you need to run the binary from another location, you must provide the path to the repo root using the --repo-root
argument. The --junit-paths
argument accepts the xml file locations as both a list of globs or absolute paths.
If you're interested in better understanding this binary or want to contribute to it, you can find the open source repo here.
Last updated