Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flaky-tests/detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ You can specify a variant during upload using the [`--variant` option](uploader.

{% code title="Upload an iOS variant " %}
```
./trunk flakytests upload --junit-paths "test_output.xml" \
./trunk-analytics-cli upload --junit-paths "test_output.xml" \
--org-url-slug <TRUNK_ORG_SLUG> \
--token $TRUNK_API_TOKEN \
--variant ios
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ steps:
- script: |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk
chmod +x ./trunk
./trunk flakytests upload --junit-paths "<XML_GLOB_PATH>" \
./trunk-analytics-cli upload --junit-paths "<XML_GLOB_PATH>" \
--org-url-slug $(TRUNK_ORG_SLUG) \
--token $(TRUNK_TOKEN)
condition: always() # this should always run
Expand All @@ -88,7 +88,7 @@ steps:
- script: |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk
chmod +x ./trunk
./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> \
./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> \
--org-url-slug $(TRUNK_ORG_SLUG) \
--token $(TRUNK_TOKEN)
condition: always() # this should always run
Expand All @@ -110,7 +110,7 @@ steps:
- script: |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk
chmod +x ./trunk
./trunk flakytests upload --xcresult-path <XCRESULT_PATH> \
./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> \
--org-url-slug $(TRUNK_ORG_SLUG) \
--token $(TRUNK_TOKEN)
condition: always() # this should always run
Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/bitbucket-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pipelines:
- |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk
chmod +x ./trunk
./trunk flakytests upload --junit-paths "**/junit.xml" \
./trunk-analytics-cli upload --junit-paths "**/junit.xml" \
--org-url-slug $TRUNK_ORG_SLUG \
--token $TRUNK_TOKEN
</code></pre>
Expand All @@ -91,7 +91,7 @@ pipelines:
- |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk
chmod +x ./trunk
./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> \
./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> \
--org-url-slug $TRUNK_ORG_SLUG \
--token $TRUNK_TOKEN
```
Expand All @@ -114,7 +114,7 @@ pipelines:
- |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk
chmod +x ./trunk
./trunk flakytests upload --xcresult-path <XCRESULT_PATH> \
./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> \
--org-url-slug $TRUNK_ORG_SLUG \
--token $TRUNK_TOKEN
```
Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/buildkite.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ steps:
- label: Upload Test Results to Trunk.io
commands:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
key: upload
depends_on:
- tests
Expand All @@ -83,7 +83,7 @@ steps:
- label: Upload Test Results to Trunk.io
commands:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
key: upload
depends_on:
- tests
Expand All @@ -100,7 +100,7 @@ steps:
- label: Upload Test Results to Trunk.io
commands:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
key: upload
depends_on:
- tests
Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/circleci.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
name: Upload Test Results to Trunk.io
command: |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
./trunk flakytests upload --junit-paths "**/junit.xml" --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
./trunk-analytics-cli upload --junit-paths "**/junit.xml" --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
```
{% endtab %}

Expand All @@ -90,7 +90,7 @@ jobs:
name: Upload Test Results to Trunk.io
command: |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
```
{% endtab %}

Expand All @@ -109,7 +109,7 @@ jobs:
name: Upload Test Results to Trunk.io
command: |
curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
./trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
```
{% endtab %}

Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/droneci.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ steps:
from_secret: TRUNK_API_TOKEN
commands:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --junit-paths <XML_GLOB_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --junit-paths <XML_GLOB_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand All @@ -96,7 +96,7 @@ steps:
from_secret: TRUNK_API_TOKEN
commands:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand All @@ -118,7 +118,7 @@ steps:
from_secret: TRUNK_API_TOKEN
commands:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ upload_test_results: # This job uploads tests results run in the last stage to T
stage: flaky-tests
script:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand All @@ -94,7 +94,7 @@ upload_test_results: # This job uploads tests results run in the last stage to T
stage: flaky-tests
script:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand All @@ -114,7 +114,7 @@ upload_test_results: # This job uploads tests results run in the last stage to T
stage: flaky-tests
script:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pipeline {
}
stage('Upload Test Results'){
sh 'curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk'
sh './trunk flakytests upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN'
sh './trunk-analytics-cli upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN'
}
}
}
Expand All @@ -87,7 +87,7 @@ pipeline {
}
stage('Upload Test Results'){
sh 'curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk'
sh './trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN'
sh './trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN'
}
}
}
Expand All @@ -106,7 +106,7 @@ pipeline {
}
stage('Upload Test Results'){
sh 'curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk'
sh './trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN'
sh './trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion flaky-tests/get-started/ci-providers/otherci.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The following is an example of a script to upload test results after your tests
To find out how to produce the report files the uploader needs, see the instructions for your test framework in the [frameworks](../frameworks/ "mention") docs.

<pre class="language-sh"><code class="lang-sh">curl -fsSLO --retry 3 https://trunk.io/releases/trunk &#x26;&#x26; chmod +x trunk
<strong>./trunk flakytests upload --junit-paths "**/report.xml" --org-url-slug &#x3C;TRUNK_ORG_SLUG> --token "${TRUNK_TOKEN}"
<strong>./trunk-analytics-cli upload --junit-paths "**/report.xml" --org-url-slug &#x3C;TRUNK_ORG_SLUG> --token "${TRUNK_TOKEN}"
</strong></code></pre>

See the [uploader.md](../../uploader.md "mention") for all available command line arguments and usage.
Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/semaphoreci.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ blocks:
commands:
# Upload results to trunk.io
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x trunk
- ./trunk flakytests upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
- ./trunk-analytics-cli upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
```
{% endtab %}

Expand Down Expand Up @@ -116,7 +116,7 @@ blocks:
commands:
# Upload results to trunk.io
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x trunk
- ./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
- ./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
```
{% endtab %}

Expand Down Expand Up @@ -148,7 +148,7 @@ blocks:
commands:
# Upload results to trunk.io
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x trunk
- ./trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
- ./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token ${TRUNK_TOKEN}
```
{% endtab %}

Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/get-started/ci-providers/travisci.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ node_js:
- 20
script:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --junit-paths "<XML_GLOB_PATH>" --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand All @@ -80,7 +80,7 @@ node_js:
- 20
script:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand All @@ -92,7 +92,7 @@ node_js:
- 20
script:
- curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x ./trunk
- ./trunk flakytests upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
- ./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> --org-url-slug <TRUNK_ORG_SLUG> --token $TRUNK_TOKEN
```
{% endtab %}

Expand Down
6 changes: 3 additions & 3 deletions flaky-tests/quarantining.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ To handle build issues that occur outside test runs, use the --test-process-exit
**Example**

```sh
./trunk flakytests test --junit-paths "test_output.xml" \
./trunk-analytics-cli test --junit-paths "test_output.xml" \
--org-url-slug <TRUNK_ORG_SLUG> \
--token $TRUNK_API_TOKEN \
--junit-paths="**/results/*.xml" \
Expand Down Expand Up @@ -161,7 +161,7 @@ If you upload your test results as a second step after you run your tests, you
```bash
<run my tests> || true # doesn't fail job on failure
|
./trunk flakytests upload \
./trunk-analytics-cli upload \
--org-url-slug $TRUNK_ORG_SLUG \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH
Expand All @@ -173,7 +173,7 @@ You can also wrap the test command with the Trunk CLI. When wrapping the command

{% code overflow="wrap" %}
```bash
./trunk flakytests test \
./trunk-analytics-cli test \
--org-url-slug <TRUNK_ORG_SLUG> \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH \
Expand Down
4 changes: 2 additions & 2 deletions flaky-tests/uploader.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Trunk can accept JUnit XMLs through the `--junit-paths` argument:
Trunk can accept Bazel through the `--bazel-bep-path` argument:

```
./trunk flakytests upload --bazel-bep-path <BEP_JSON_PATH> \
./trunk-analytics-cli upload --bazel-bep-path <BEP_JSON_PATH> \
--org-url-slug <TRUNK_ORG_SLUG> \
--token $TRUNK_API_TOKEN
```
Expand All @@ -109,7 +109,7 @@ Trunk can accept Bazel through the `--bazel-bep-path` argument:
Trunk can accept XCode through the `--xcresult-path` argument:

```
./trunk flakytests upload --xcresult-path <XCRESULT_PATH> \
./trunk-analytics-cli upload --xcresult-path <XCRESULT_PATH> \
--org-url-slug <TRUNK_ORG_SLUG> \
--token $TRUNK_API_TOKEN
```
Expand Down