Skip to content
Merged
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
9 changes: 9 additions & 0 deletions content/en/code_coverage/data_collected.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}

Expand Down
20 changes: 19 additions & 1 deletion content/en/code_coverage/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}

Expand Down Expand Up @@ -315,6 +322,17 @@ steps:
</code>
</pre>
{{% /tab %}}
{{% tab "Gitlab" %}}
<pre>
<code class="language-yaml" data-lang="yaml">
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
</code>
</pre>
{{% /tab %}}
{{< /tabs >}}

The command recursively searches the specified directories for supported coverage report files, so specifying the current directory (`.`) is usually sufficient.
Expand All @@ -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
```
Expand Down
Loading