Skip to content

Commit 89b0dde

Browse files
gewenyu99gitbook-bot
authored andcommitted
GITBOOK-731: No subject
1 parent 7b8ef04 commit 89b0dde

15 files changed

+65
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Have questions?Join us and ...
3+
---
4+
5+
{% hint style="success" %}
6+
**Have questions?**
7+
8+
Join us and 1500+ fellow engineers [on Slack](https://slack.trunk.io/) to get help with Trunk.
9+
{% endhint %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: You must upload tests from ...
3+
---
4+
5+
{% hint style="danger" %}
6+
You must upload tests from both PR and [**stable branchs**](https://docs.trunk.io/flaky-tests/detection#stable-branches), such as `main`, `master`, or `develop` in CI for Trunk to detect flaky tests. Trunk will not detect flaky tests without uploads from both PR and stable branches. 
7+
8+
[Learn more about detection](../../flaky-tests/detection.md)
9+
{% endhint %}

flaky-tests/get-started/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ You can follow along using the in-app onboarding wizard or read about it in our
2626

2727
After you've set your test framework to output test results, you're ready to update your CI jobs to upload test results to Trunk.
2828

29+
{% include "../../.gitbook/includes/you-must-upload-tests-from-....md" %}
30+
2931
<figure><picture><source srcset="../../.gitbook/assets/add-test-framework-step-4-dark.png" media="(prefers-color-scheme: dark)"><img src="../../.gitbook/assets/add-test-framework-step-4-light.png" alt=""></picture><figcaption><p>Step 4 of the in-app onboarding wizard</p></figcaption></figure>
3032

3133
You can follow along using the in-app onboarding wizard or read about it in our docs.
@@ -54,8 +56,6 @@ Flaky Tests can post comments on GitHub pull requests to provide a summary of al
5456

5557
<figure><picture><source srcset="../../.gitbook/assets/github-comment-dark.png" media="(prefers-color-scheme: dark)"><img src="../../.gitbook/assets/github-comment-light.png" alt=""></picture><figcaption></figcaption></figure>
5658

57-
58-
5959
To enable PR Comments, see our documentation:
6060

6161
{% embed url="https://docs.trunk.io/flaky-tests/github-pull-request-comments" %}
@@ -67,3 +67,5 @@ Quarantining is an advanced feature that allows your CI test jobs to pass even i
6767
To enable Quarantining, see our documentation:
6868

6969
{% embed url="https://docs.trunk.io/flaky-tests/quarantining" %}
70+
71+
{% include "../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/azure-devops-pipelines.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Your Trunk Organization Slug can be pasted directly into your CI workflow; it's
2626

2727
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 [stable branches](../../detection.md#stable-branches), for example, `main`, `master`, or `develop`.
2828

29+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
30+
2931
#### Add Uploader to Testing Pipelines
3032

3133
The following is an example of a 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.
@@ -60,6 +62,5 @@ Ensure you report every test run in CI and **clean up stale files** produced by
6062

6163
[Learn more about cleaning up artifacts in Azure DevOps Pipelines](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops\&tabs=yaml#clean-the-local-repo-on-the-agent)
6264

63-
#### Need Help?
65+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}
6466

65-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.

flaky-tests/get-started/ci-providers/bitbucket-pipelines.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In [app.trunk.io](https://app.trunk.io/login?intent=flaky%20tests), navigate to:
1212

1313
**Settings > Organization > Manage > Organization API Token > View Organization API Token > View**
1414

15-
Store your API Token in your BitBucket as a new variable named `TRUNK_TOKEN`. Make sure you are getting your _organization token_, not your project/repo token.
15+
Store your API Token in your BitBucket as a new variable named `TRUNK_TOKEN`. Make sure you are getting your _organization token_, not your project/repo token.
1616

1717
### 2. Grab your Organization Slug
1818

@@ -26,6 +26,8 @@ Your Trunk Organization Slug can be pasted directly into your CI workflow; it's
2626

2727
Add an `after-script` 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 [stable branches](../../detection.md#stable-branches), for example, `main`, `master`, or `develop`.
2828

29+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
30+
2931
#### Add Uploader to Testing Pipelines
3032

3133
The following is an example of a 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.
@@ -61,6 +63,4 @@ Ensure you report every test run in CI and **clean up stale files** produced by
6163

6264
You can do this by omitting the `artifacts` definitions in the test steps of your configuration. [Learn more about artifacts in BitBucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/use-artifacts-in-steps/).
6365

64-
#### Need Help?
65-
66-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
66+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/buildkite.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
3030

3131
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
3232

33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
34+
3335
#### Example Buildkite Pipeline
3436

3537
The following is an example of a Buildkite 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.
@@ -57,6 +59,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
5759
5860
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
5961

60-
#### Need Help?
61-
62-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
62+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/circleci.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
3030

3131
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
3232

33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
34+
3335
#### Example CircleCI workflow
3436

3537
The following is an example of a 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.
@@ -59,6 +61,4 @@ See the [Uploader CLI Reference](https://docs.trunk.io/flaky-tests/uploader) for
5961
6062
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
6163

62-
**Need Help?**
63-
64-
Join the [Trunk Slack Community](https://slack.trunk.io/) for live support.
64+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/droneci.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
3030

3131
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 [stable branches](../../detection.md#stable-branches), for example, `main`, `master`, or `develop`.
3232

33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
34+
3335
#### Add Uploader to Testing Pipelines
3436

3537
The following is an example of a 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.
@@ -62,6 +64,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
6264
6365
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
6466

65-
#### Need Help?
66-
67-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
67+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/github-actions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
3030

3131
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 [stable branches](../../detection.md#stable-branches), for example: `main`, `master`, or `develop`.
3232

33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
34+
3335
#### Example GitHub Actions Workflow
3436

3537
The following is an example of a GitHub Actions workflow step to upload test results after your tests using Trunk's [**Analytics Uploader Action**](https://github.com/trunk-io/analytics-uploader).
@@ -63,6 +65,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
6365

6466
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
6567

66-
#### Need Help?
67-
68-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
68+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/gitlab.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
2828

2929
### 3. Modify GitLab pipelines to upload test results
3030

31-
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`..
31+
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
32+
33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
3234

3335
#### Example GitLab Pipeline
3436

@@ -60,6 +62,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
6062
6163
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
6264

63-
#### Need Help?
64-
65-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
65+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/jenkins.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
2828

2929
### 3. Modify Jenkins pipeline to upload test results
3030

31-
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`..
31+
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
32+
33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
3234

3335
#### Example Jenkins Pipeline
3436

@@ -59,6 +61,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
5961

6062
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
6163

62-
#### Need Help?
63-
64-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
64+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/otherci.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
2828

2929
### 3. Modify workflows to upload test results
3030

31-
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`..
31+
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
32+
33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
3234

3335
#### Example Upload Script
3436

@@ -47,6 +49,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
4749

4850
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
4951

50-
#### Need Help?
51-
52-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
52+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/semaphoreci.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
2828

2929
### 3. Modify Semaphore CI workflows to upload test results
3030

31-
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`..
31+
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
32+
33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
3234

3335
#### Example Semaphore CI Workflow
3436

@@ -72,6 +74,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
7274

7375
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
7476

75-
#### Need Help?
76-
77-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
77+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/teamcity.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Your slug can just be pasted directly into your CI workflow; it's not a secret.
2626

2727
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 [stable branches](../../detection.md#stable-branches), for example, `main`, `master`, or `develop`.
2828

29+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
30+
2931
#### Add Uploader to a Build Step
3032

3133
Add the following command as a build step after your test run to upload test results. Note: you must either run `trunk` from the repo root when uploading test results or pass a `--repo-root` argument.
@@ -38,7 +40,7 @@ chmod +x ./trunk
3840
--token $TRUNK_TOKEN
3941
```
4042

41-
In your build step settings under the **Show advanced options** toggle, find the **Execute step settings** and select `Always, even if build stop command was issued` to ensure that the Upload step will still run if tests have failed.&#x20;
43+
In your build step settings under the **Show advanced options** toggle, find the **Execute step settings** and select `Always, even if build stop command was issued` to ensure that the Upload step will still run if tests have failed.
4244

4345
To find out how to produce the JUnit XML files the uploader needs, see the instructions for your test framework in the [Test Frameworks](https://docs.trunk.io/flaky-tests/frameworks) docs.
4446

@@ -50,6 +52,4 @@ Ensure you report every test run in CI and **clean up stale files** produced by
5052

5153
You can do this in TeamCity by omitting your JUnit XML path in the saved artifacts. [Learn more about artifacts in TeamCity](https://www.jetbrains.com/help/teamcity/cloud/configure-and-run-your-first-build.html#Artifacts).
5254

53-
#### Need Help?
54-
55-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
55+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

flaky-tests/get-started/ci-providers/travisci.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Your Trunk Organization Slug can just be pasted directly into your CI workflow;
2828

2929
### 3. Modify Travis CI workflows to upload test results
3030

31-
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`..
31+
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 [stable branches](../../detection.md#stable-branches), for example,`main`, `master`, or `develop`.
32+
33+
{% include "../../../.gitbook/includes/you-must-upload-tests-from-....md" %}
3234

3335
#### Example Travis CI Workflow
3436

@@ -54,6 +56,4 @@ See the [uploader.md](../../uploader.md "mention") for all available command lin
5456
5557
Ensure you report every test run in CI and **clean up stale files** produced by your test framework. If you're reusing test runners and using a glob like `**/junit.xml` to upload tests, stale files not cleaned up will be included in the current test run, throwing off detection of flakiness. You should clean up all your results files after every upload step.
5658

57-
#### Need Help?
58-
59-
Join the [Trunk Slack Community](https://slack.trunk.io) for live support.
59+
{% include "../../../.gitbook/includes/have-questions-join-us-and-....md" %}

0 commit comments

Comments
 (0)