Skip to content

Commit e9e96d7

Browse files
jeremjeremad
authored andcommitted
Add pipelines email documentation
1 parent d9818d1 commit e9e96d7

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
layout: "gitlab"
3+
page_title: "GitLab: gitlab_service_pipelines_email"
4+
sidebar_current: "docs-gitlab-resource-service_pipelines_email"
5+
description: |-
6+
Manage Pipelines email integration that emails the pipeline status to a list of recipients.
7+
---
8+
9+
# gitlab\_service\_pipelines_email
10+
11+
This resource manages a [Pipelines email integration](https://docs.gitlab.com/ee/user/project/integrations/overview.html#integrations-listing) that emails the pipeline status to a list of recipients.
12+
13+
## Example Usage
14+
15+
```hcl
16+
resource "gitlab_project" "awesome_project" {
17+
name = "awesome_project"
18+
description = "My awesome project."
19+
visibility_level = "public"
20+
}
21+
22+
resource "gitlab_service_pipelines_email" "email" {
23+
project = gitlab_project.awesome_project.id
24+
recipients = ["[email protected]"]
25+
notify_only_broken_pipelines = true
26+
branches_to_be_notified = "all"
27+
}
28+
```
29+
30+
## Argument Reference
31+
32+
The following arguments are supported:
33+
34+
* `project` - (Required, string) ID of the project you want to activate integration on.
35+
36+
* `recipients` - (Required, set(string)) email addresses where notifications are sent.
37+
38+
* `notify_only_broken_pipelines` - (Optional, bool) Notify only broken pipelines. Default is true.
39+
40+
* `branches_to_be_notified` - (Optional, string) Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. Default is `default`
41+
42+
## Importing Pipelines email service
43+
44+
You can import a service_pipelines_email state using `terraform import <resource> <project_id>`:
45+
46+
```bash
47+
$ terraform import gitlab_service_pipelines_email.email 1
48+
```

website/gitlab.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
<li<%= sidebar_current("docs-gitlab-resource-service_jira") %>>
9797
<a href="/docs/providers/gitlab/r/service_jira.html">gitlab_service_jira</a>
9898
</li>
99+
<li<%= sidebar_current("docs-gitlab-resource-service_pipelines_email") %>>
100+
<a href="/docs/providers/gitlab/r/service_pipelines_email.html">gitlab_service_pipelines_email</a>
101+
</li>
99102
<li<%= sidebar_current("docs-gitlab-resource-service_slack") %>>
100103
<a href="/docs/providers/gitlab/r/service_slack.html">gitlab_service_slack</a>
101104
</li>

0 commit comments

Comments
 (0)