diff --git a/content/en/code_coverage/data_collected.md b/content/en/code_coverage/data_collected.md index ac825500f592b..612e3151d8e48 100644 --- a/content/en/code_coverage/data_collected.md +++ b/content/en/code_coverage/data_collected.md @@ -32,6 +32,15 @@ See GitHub's [webhook events and payloads documentation][1] for a detailed descr [1]: https://docs.github.com/en/webhooks/webhook-events-and-payloads +{{% /tab %}} +{{% tab "Gitlab" %}} + +Code Coverage relies on Gitlab webhooks. The webhooks do not include your source code content. They only include metadata about the merge request, such as the title, description, author, labels, and commit SHAs. + +See Gitlab's [webhook events and payloads documentation][1] for a detailed description of the data sent by webhooks. + +[1]: https://docs.gitlab.com/user/project/integrations/webhook_events/ + {{% /tab %}} {{< /tabs >}} diff --git a/content/en/code_coverage/setup.md b/content/en/code_coverage/setup.md index 7fd3bca921141..b34ea7dc10350 100644 --- a/content/en/code_coverage/setup.md +++ b/content/en/code_coverage/setup.md @@ -51,6 +51,13 @@ If everything is configured correctly, a green check mark is displayed in Datado [1]: /integrations/github/#github-apps-1 [2]: https://app.datadoghq.com/integrations/github/configuration +{{% /tab %}} +{{% tab "Gitlab" %}} + +Follow instructions in the [Datadog Source Code Integration Guide][1] on how to connect your Gitlab repositories to Datadog. + +[1]: /integrations/guide/source-code-integration/?tab=gitlabsaasonprem#connect-your-git-repositories-to-datadog + {{% /tab %}} {{< /tabs >}} @@ -315,6 +322,17 @@ steps: {{% /tab %}} +{{% tab "Gitlab" %}} +
+
+test:
+ stage: test
+ script:
+ - ... # run your tests and generate coverage reports
+ - datadog-ci coverage upload . # make sure to add the DD_API_KEY CI/CD variable
+
+
+{{% /tab %}}
{{< /tabs >}}
The command recursively searches the specified directories for supported coverage report files, so specifying the current directory (`.`) is usually sufficient.
@@ -341,7 +359,7 @@ datadog-ci coverage upload --format=lcov \
### Coverage upload fails with "Format could not be detected" error
The `datadog-ci coverage upload` command automatically detects the format of the coverage report files based on their content and file extension.
-If the command fails with the following error:
+If the command fails with the following error:
```
Invalid coverage report file [...]: format could not be detected
```