diff --git a/content/en/synthetics/cicd_integrations/_index.md b/content/en/synthetics/cicd_integrations/_index.md index 5ad860dc5c678..019e652c91a32 100644 --- a/content/en/synthetics/cicd_integrations/_index.md +++ b/content/en/synthetics/cicd_integrations/_index.md @@ -66,7 +66,7 @@ The test triggering endpoint supports up to 50 tests in one request. } ``` -The `TEST_TO_TRIGGER` objects compose of the required `public_id` for the test you want to trigger and the optional configuration overrides. For descriptions of each field, see [Configure tests](#configure-tests). +The `TEST_TO_TRIGGER` objects compose of the required `public_id` for the test you want to trigger and the optional configuration overrides. For descriptions of each field, see [Configure tests][3]. A test's public identifier is either the identifier of the test found in the URL of a test's details page (for example: the identifier for `https://app.datadoghq.com/synthetics/details/abc-def-ghi` is `abc-def-ghi`) or the full URL of a test's details page (for example: `https://app.datadoghq.com/synthetics/details/abc-def-ghi`). @@ -74,19 +74,19 @@ For more information, see the [Synthetics API endpoint documentation][1]. ### Get details of batch -The get batch details endpoint [@Beth to add description here]... +The get batch details endpoint retrieves results for the group of tests triggered in your CI/CD pipeline, otherwise known as a batch. You must provide the `batch_id` for the relevant CI execution. -* **Endpoint**: `https://api.{{< region-param key="dd_site" >}}/api/v1/synthetics/tests/poll_results` +* **Endpoint**: `https://api.{{< region-param key="dd_site" >}}/api/v1/synthetics/ci/batch/{batch_id}` * **Method**: `GET` -* **Parameters**: A JSON array containing the list of result identifiers to obtain results from. +* **Parameters**: The `batch_id` for the batch of test results you want to inspect. For more information, see the [Synthetics API endpoint documentation][2]. ## Use the CLI -The [`@datadog/datadog-ci` package][3] allows you to run Synthetics tests directly within your CI/CD pipeline. +The [`@datadog/datadog-ci` package][4] allows you to run Synthetics tests directly within your CI/CD pipeline. -To use the [`@datadog/datadog-ci` NPM package][4], see [Configuration][5]. +To use the [`@datadog/datadog-ci` NPM package][5], see [Configuration][6]. You can also trigger tests by searching with tags. For example: `"ci": "datadog-ci synthetics run-tests --config fileconfig.json -s 'tag:staging'"`. @@ -98,6 +98,7 @@ You can also trigger tests by searching with tags. For example: `"ci": "datadog- [1]: /api/latest/synthetics/#trigger-tests-from-cicd-pipelines [2]: /api/latest/synthetics/#get-details-of-batch -[3]: https://github.com/DataDog/datadog-ci -[4]: https://www.npmjs.com/package/@datadog/datadog-ci -[5]: /synthetics/cicd_integrations/configuration +[3]: /synthetics/cicd_integrations/configuration#configure-tests +[4]: https://github.com/DataDog/datadog-ci +[5]: https://www.npmjs.com/package/@datadog/datadog-ci +[6]: /synthetics/cicd_integrations/configuration diff --git a/content/en/synthetics/cicd_integrations/configuration.md b/content/en/synthetics/cicd_integrations/configuration.md index e6927e7b917f0..0e79f4d709407 100644 --- a/content/en/synthetics/cicd_integrations/configuration.md +++ b/content/en/synthetics/cicd_integrations/configuration.md @@ -89,6 +89,12 @@ In the global configuration file, you can configure the following options: `subdomain` : The name of the custom subdomain set to access your Datadog application. If the URL used to access Datadog is `myorg.datadoghq.com`, the `subdomain` value then needs to be set to `myorg`. +`tunnel` +: Use the [secure tunnel][3] to execute your test batch. + +`testSearchQuery` +: Passes a query to select which Synthetic tests to run. If you are running tests in the CLI, use the `-s` flag. + For example: {{< code-block lang="json" filename="Global Configuration File" disable_copy="false" collapsible="true" >}} @@ -122,7 +128,8 @@ For example: "port": 3128, "protocol": "http" }, - "subdomain": "subdomainname" + "subdomain": "subdomainname", + "tunnel": true } {{< /code-block >}} @@ -149,7 +156,7 @@ For example: #### Additional configuration -The default configurations used for the tests are the original tests' configurations, which are visible in the UI or by [getting your tests' configurations from the API][3]. +The default configurations used for the tests are the original tests' configurations, which are visible in the UI or by [getting your tests' configurations from the API][4]. However, in the context of your CI deployment, you may decide to override some or all of your test parameters with the overrides below. To define overrides for all of your tests, set the same parameters at the [global configuration file](#setup-a-client) level. @@ -303,7 +310,7 @@ Whether you use Synthetic tests to control your CI/CD deployments in production To trigger an existing Synthetics test on a staging endpoint instead of in production, set the `$SUBDOMAIN` environment variable to `staging-example` and the `$PORT` environment variable to a port used for staging. Your Synthetic tests run against the generated staging URL instead of running in production. -For example, you can write `https://www.example.org:81/path/to/something?abc=123#target` as: +For example, you can write `https://app.datadoghq.com/synthetics/details/abc-123-zyx?live=1h#test-results` as: * `{{PROTOCOL}}//{{SUBDOMAIN}}.{{DOMAIN}}:{{PORT}}{{PATHNAME}}{{PARAMS}}{{HASH}}` * `{{PROTOCOL}}//{{HOST}}{{PATHNAME}}{{PARAMS}}{{HASH}}` @@ -356,7 +363,7 @@ The [@datadog/datadog-ci][1] NPM package also comes with secure tunnelling, allo The testing tunnel creates an end-to-end encrypted HTTP proxy between your infrastructure and Datadog that allows all test requests sent through the CLI to be automatically routed through the `datadog-ci` client. -For more information, see [Testing Tunnel][4]. +For more information, see [Testing Tunnel][3]. ### Visualize test results @@ -382,6 +389,6 @@ You can also see your CI test results listed in the [CI Results Explorer][5] and [1]: https://www.npmjs.com/package/@datadog/datadog-ci [2]: https://github.com/TooTallNate/node-proxy-agent -[3]: /api/latest/synthetics/#get-a-test-configuration -[4]: /synthetics/testing_tunnel/ +[3]: /synthetics/testing_tunnel/ +[4]: /api/latest/synthetics/#get-a-test-configuration [5]: /synthetics/ci_results_explorer