Skip to content

Commit

Permalink
Clarify instructions for running the CLI from docker (#2787)
Browse files Browse the repository at this point in the history
* Clarify instructions for running the CLI from docker

Clarified the instructions on how to run the CLI from docker, including explaining that it would need to connect to a remote Tracetest server.

* Apply suggestions from code review

Co-authored-by: Julianne Fermi <julianne@kubeshop.io>

* Update docs/docs/ci-cd-automation/overview.md

Co-authored-by: Julianne Fermi <julianne@kubeshop.io>

* Update docs/docs/cli/configuring-your-cli.md

Co-authored-by: Julianne Fermi <julianne@kubeshop.io>

* Update docs/docs/cli/configuring-your-cli.md

Co-authored-by: Julianne Fermi <julianne@kubeshop.io>

---------

Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
Co-authored-by: Julianne Fermi <julianne@kubeshop.io>
  • Loading branch information
3 people committed Jun 21, 2023
1 parent 9b4f226 commit c156889
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions docs/docs/ci-cd-automation/overview.md
Expand Up @@ -14,12 +14,18 @@ If you want to see more examples with other CI/CD tools, let us know by [opening

Tracetest is designed to work with all CI/CD platforms and automation tools. To enable Tracetest to run in CI/CD environments, make sure to [install the Tracetest CLI](../getting-started/installation.mdx) and configure it to access your [Tracetest server](../configuration/server.md).

You can also directly execute the Tracetest CLI from a Docker image rather than installing the CLI on your local machine. This can be convenient when you wish to execute the CLI in a CI/CD environment.
### Running Tracetest CLI from Docker

Many integrations with CI/CD tools can be accomplished by running the [Tracetest CLI](../cli/configuring-your-cli) to execute a test against a remote Tracetest server. If you do not want to install the Tracetest CLI in your environment, you can choose to directly execute it from a Docker image.

**How to Use**:

Use the command below, substituting the following placeholders:
- <your-tracetest-server-url> - the URL to the running Tracetest server you wish to execute the test on. Example: http://localhost:11633/
- <file-path> - The path to the saved Tracetest test. Example: ./mytest.yaml

```sh
docker run --rm -it -v$(pwd):$(pwd) -w $(pwd) --entrypoint tracetest kubeshop/tracetest:latest -s http://host.docker.internal:11633/ test run --definition <file-path> --wait-for-result
docker run --rm -it -v$(pwd):$(pwd) -w $(pwd) --network host --entrypoint tracetest kubeshop/tracetest:latest -s <your-tracetest-server-url> test run --definition <file-path> --wait-for-result
```

To read more about integrating Tracetest with CI/CD tools, check out tutorials in our blog:
Expand Down
8 changes: 7 additions & 1 deletion docs/docs/cli/configuring-your-cli.md
Expand Up @@ -65,8 +65,14 @@ There are times when it is easier to directly execute the Tracetest CLI from a D

**How to Use**:

Use the command below, substituting the following placeholders:
- <your-tracetest-server-url> - The URL to the running Tracetest server you wish to execute the test on. Example: http://localhost:11633/

- <file-path> - The path to the saved Tracetest test. Example: ./mytest.yaml


```sh
docker run --rm -it -v$(pwd):$(pwd) -w $(pwd) --network host --entrypoint tracetest kubeshop/tracetest:latest -s http://localhost:11633/ test run --definition <file-path> --wait-for-result
docker run --rm -it -v$(pwd):$(pwd) -w $(pwd) --network host --entrypoint tracetest kubeshop/tracetest:latest -s <your-tracetest-server-url> test run --definition <file-path> --wait-for-result
```


0 comments on commit c156889

Please sign in to comment.