Skip to content

Commit 47e1b45

Browse files
nikita-tkachenko-datadogmaycmlee
authored andcommitted
Add Gitlab set up instructions for Code Coverage product (#31260)
* Add Gitlab set up instructions for Code Coverage product * Apply suggestions from code review Co-authored-by: May Lee <[email protected]> --------- Co-authored-by: May Lee <[email protected]>
1 parent 231ae1e commit 47e1b45

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

content/en/code_coverage/data_collected.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ See GitHub's [webhook events and payloads documentation][1] for a detailed descr
3232

3333
[1]: https://docs.github.com/en/webhooks/webhook-events-and-payloads
3434

35+
{{% /tab %}}
36+
{{% tab "Gitlab" %}}
37+
38+
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.
39+
40+
See Gitlab's [webhook events and payloads documentation][1] for a detailed description of the data sent by webhooks.
41+
42+
[1]: https://docs.gitlab.com/user/project/integrations/webhook_events/
43+
3544
{{% /tab %}}
3645
{{< /tabs >}}
3746

content/en/code_coverage/setup.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ If everything is configured correctly, a green check mark is displayed in Datado
5151

5252
[1]: /integrations/github/#github-apps-1
5353
[2]: https://app.datadoghq.com/integrations/github/configuration
54+
{{% /tab %}}
55+
{{% tab "Gitlab" %}}
56+
57+
Follow instructions in the [Datadog Source Code Integration Guide][1] on how to connect your Gitlab repositories to Datadog.
58+
59+
[1]: /integrations/guide/source-code-integration/?tab=gitlabsaasonprem#connect-your-git-repositories-to-datadog
60+
5461
{{% /tab %}}
5562
{{< /tabs >}}
5663

@@ -315,6 +322,17 @@ steps:
315322
</code>
316323
</pre>
317324
{{% /tab %}}
325+
{{% tab "Gitlab" %}}
326+
<pre>
327+
<code class="language-yaml" data-lang="yaml">
328+
test:
329+
stage: test
330+
script:
331+
- ... # run your tests and generate coverage reports
332+
- datadog-ci coverage upload . # make sure to add the DD_API_KEY CI/CD variable
333+
</code>
334+
</pre>
335+
{{% /tab %}}
318336
{{< /tabs >}}
319337

320338
The command recursively searches the specified directories for supported coverage report files, so specifying the current directory (`.`) is usually sufficient.

0 commit comments

Comments
 (0)