Skip to content

Commit

Permalink
GITBOOK-608: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
dapirian authored and gitbook-bot committed Nov 6, 2024
1 parent 8b2e8b8 commit 1fabde6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
22 changes: 11 additions & 11 deletions flaky-tests/ci-providers/buildkite-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ description: Configure Buildkite jobs to upload test results to Trunk Flaky Test

### Introduction

Trunk Flaky Tests integrates with your CI by adding an `Upload Test Results` step in each of your testing CI jobs via the [Trunk Uploader CLI](../uploader.md). Just specify file path globs for JUnit XML files, supported by virtually all test frameworks. See the [Test Frameworks](../frameworks/) docs for instructions on producing JUnit XML output for your test runner.
Trunk Flaky Tests integrates with your CI by adding an `Upload Test Results` step in each of your testing CI jobs via the [Trunk Uploader CLI](../uploader.md). See the [Test Frameworks](../frameworks/) docs for instructions on producing JUnit XML output for your test runner, supported by virtually all test frameworks, which is what Trunk ingests.

### Step 1: Store a TRUNK\_TOKEN secret in your CI system

In [app.trunk.io](http://app.trunk.io), navigate to:

**`Settings` -> `Manage Organization` -> `Organization API Token`**

Store your API Token in a CI [secret](https://buildkite.com/docs/pipelines/secrets) named `TRUNK_TOKEN`.
Store your API Token in a [CI secret](https://buildkite.com/docs/pipelines/security/secrets/managing) named `TRUNK_TOKEN`.

### Step 2: Modify Buildkite test jobs to upload results to Trunk

Add an `Upload Test Results` step after running tests in each of your CI jobs that run tests. This should be minimally all jobs that runs on pull requests, as well as from jobs that run on your main or protected branches (`main`, `master`, `develop`, etc) .

#### Get your Organization Slug
### Step 2: Grab your Organization Slug

To upload test results to Trunk, you'll need to pass a Trunk Org Slug to the upload command. Replace `TRUNK_ORG_SLUG` in the example workflow below with your actual Trunk Organization Slug, which you can find in:

 **`Settings` -> `Manage` -> `Organization` -> `Organization Slug`**

Your Trunk Organization Slug can just be pasted directly into your CI workflow, it's not a secret.
Your Trunk Organization Slug can just be pasted directly into your CI workflow; it's not a secret.

### Step 3: Modify Buildkite jobs to upload test results

Add an `Upload Test Results` step after running tests in each of your CI jobs that run tests. This should be minimally all jobs that run on pull requests, as well as from jobs that run on your main or protected branches (`main`, `master`, `develop`, etc) .

#### Example Buildkite Workflow

The following is an example of a buildkite workflow step to upload test results after your tests run. You must either run `trunk` from the repo root when uploading test results, or supply a `--repo-root` argument.
The following is an example of a buildkite workflow step to upload test results after your tests run. Note: you must either run `trunk` from the repo root when uploading test results or pass a `--repo-root` argument.

To find out how to product the JUnit XML files the uploader needs, see instructions for your test framework in the [frameworks](../frameworks/ "mention") docs.
To find out how to produce the JUnit XML files the uploader needs, see the instructions for your test framework in the [frameworks](../frameworks/ "mention") docs.

```yaml
steps:
Expand All @@ -53,4 +53,4 @@ See the [uploader.md](../uploader.md "mention") for all available command line a
#### Need Help?
Join the [Trunk Slack Community](https://slack.trunk.io) for live help and support.
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
9 changes: 4 additions & 5 deletions flaky-tests/ci-providers/readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
description: >-
You can easily integrate Flaky Tests from any CI Provider. Please find
quickstart instructions below that match your setup.
description: You can easily integrate Flaky Tests from any CI Provider.
---

# CI Providers

### Quickstart
Trunk Flaky Tests integrates with your CI by adding an `Upload Test Results` step in each of your testing CI jobs via the [Trunk Uploader CLI](../uploader.md). See the [Test Frameworks](../frameworks/) docs for instructions on producing JUnit XML output for your test runner, supported by virtually all test frameworks, which is what Trunk ingests.

<table data-view="cards" data-full-width="false"><thead><tr><th></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>GitHub Actions</strong></td><td></td><td><a href="github-actions-quickstart.md">github-actions-quickstart.md</a></td><td><a href="../../.gitbook/assets/GitHub (1).png">GitHub (1).png</a></td></tr><tr><td><strong>BuildKite</strong></td><td></td><td><a href="buildkite-quickstart.md">buildkite-quickstart.md</a></td><td><a href="../../.gitbook/assets/BuildKite (1).png">BuildKite (1).png</a></td></tr><tr><td><strong>CircleCI</strong></td><td></td><td><a href="circleci-quickstart.md">circleci-quickstart.md</a></td><td><a href="../../.gitbook/assets/CircleCI.png">CircleCI.png</a></td></tr><tr><td><strong>Drone CI</strong></td><td></td><td><a href="droneci.md">droneci.md</a></td><td><a href="../../.gitbook/assets/droneci.png">droneci.png</a></td></tr><tr><td><strong>Gitlab</strong></td><td></td><td><a href="gitlab.md">gitlab.md</a></td><td><a href="../../.gitbook/assets/gitlab-logo.png">gitlab-logo.png</a></td></tr><tr><td><strong>Jenkins</strong></td><td></td><td><a href="other-ci-providers-quickstart.md">other-ci-providers-quickstart.md</a></td><td><a href="../../.gitbook/assets/jenkins-padded.png">jenkins-padded.png</a></td></tr><tr><td><strong>Semaphore</strong></td><td></td><td><a href="semaphore-ci-quickstart.md">semaphore-ci-quickstart.md</a></td><td><a href="../../.gitbook/assets/semaphore-logo.png">semaphore-logo.png</a></td></tr><tr><td><strong>Travis CI</strong></td><td></td><td><a href="travisci.md">travisci.md</a></td><td><a href="../../.gitbook/assets/travis-ci-logo.png">travis-ci-logo.png</a></td></tr></tbody></table>
### Quickstart

<table data-view="cards" data-full-width="false"><thead><tr><th></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>GitHub Actions</strong></td><td></td><td><a href="github-actions-quickstart.md">github-actions-quickstart.md</a></td><td><a href="../../.gitbook/assets/github.png">github.png</a></td></tr><tr><td><strong>BuildKite</strong></td><td></td><td><a href="buildkite-quickstart.md">buildkite-quickstart.md</a></td><td><a href="../../.gitbook/assets/buildkite.png">buildkite.png</a></td></tr><tr><td><strong>CircleCI</strong></td><td></td><td><a href="circleci-quickstart.md">circleci-quickstart.md</a></td><td><a href="../../.gitbook/assets/circle-ci.png">circle-ci.png</a></td></tr><tr><td><strong>Drone CI</strong></td><td></td><td><a href="droneci.md">droneci.md</a></td><td><a href="../../.gitbook/assets/drone.png">drone.png</a></td></tr><tr><td><strong>Gitlab</strong></td><td></td><td><a href="gitlab.md">gitlab.md</a></td><td><a href="../../.gitbook/assets/gitlab.png">gitlab.png</a></td></tr><tr><td><strong>Jenkins</strong></td><td></td><td><a href="other-ci-providers-quickstart.md">other-ci-providers-quickstart.md</a></td><td><a href="../../.gitbook/assets/jenkins.png">jenkins.png</a></td></tr><tr><td><strong>Semaphore</strong></td><td></td><td><a href="semaphore-ci-quickstart.md">semaphore-ci-quickstart.md</a></td><td><a href="../../.gitbook/assets/semaphore.png">semaphore.png</a></td></tr><tr><td><strong>Travis CI</strong></td><td></td><td><a href="travisci.md">travisci.md</a></td><td><a href="../../.gitbook/assets/travis.png">travis.png</a></td></tr></tbody></table>

0 comments on commit 1fabde6

Please sign in to comment.