You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
* Add example screenshotEdit integration procedure and added example screenshot* Update slack-integration.mdAdded links to webhook integration and slack example in doc* Update slack-integration.md* Update slack-integration.md
Copy file name to clipboardExpand all lines: _docs/integrations/notifications/slack-integration.md
+44-11Lines changed: 44 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,36 +6,69 @@ sub_group: notifications
6
6
toc:true
7
7
---
8
8
9
-
You can integrate Slack globally, or for specific pipelines and builds.
9
+
You can integrate Slack globally, or for specific pipelines and builds. Codefresh can post notifications to Slack, for example, for successful and failed builds, and direct messages received within the Codefresh app.
10
+
To integrate through a custom webhook, see the[Slack documentation](https://api.slack.com/messaging/webhooks){:target="\_blank"}.
11
+
You can also look at our example on[how to set up a custom webhook notification to Slack]({{site.baseurl}}/docs/example-catalog/ci-examples/sending-the-notification-to-slack/#custom-webhook-to-slack).
12
+
13
+
14
+
##Notification options for Slack
15
+
16
+
Enable notifications for builds based on their status:
17
+
* Successful
18
+
* Failed
19
+
* Pending manual approval to continue
20
+
* Terminated by system
21
+
When selected, you receive notifications based on the build termination policies configured for the pipeline. These can be whenever:
22
+
* Previous builds from the same or a specific branch are terminated once a build is created for that branch
23
+
* Running builds are terminated once a build is created
24
+
* Child builds are terminated when the parent build is terminated
25
+
26
+
Here's an example of the notification in Slack for a system-terminated build:
caption="Example of Slack notification for system-terminated build"
33
+
alt="Example of Slack notification for system-terminated build"
34
+
max-width="60%"
35
+
%}
36
+
37
+
38
+
For detailed information, see[Policy settings for pipelines]({{site.baseurl}}/docs/pipelines/pipelines/#policies).
39
+
40
+
41
+
10
42
11
43
##Set up global Slack integration in Codefresh
12
-
<!--- what about webhooks?-->
44
+
13
45
1. In the Codefresh UI, on the toolbar, click the**Settings** icon, and then from the sidebar, select[**Pipeline Integrations**](https://g.codefresh.io/account-admin/account-conf/integration){:target="\_blank"}.
14
46
1. Select**Slack** and then click**Configure**.
15
-
1. Select**Quick Setup**.
16
-
1. Select the types of notifications you want to receive on Slack.
17
-
1. Click**Add to Slack**.<br> You are redirected to the Slack sign-in page.
18
-
1. Log in with your Slack credentials.
19
-
1. Select the check box to enable notifications for Slack.
47
+
1. To enable notifications for Slack, select**Enable this to activate Slack integration**.
48
+
1. Select**Quick Setup**, do the following:
49
+
1. Click**Add to Slack**.<br> You are redirected to the Slack sign-in page.
50
+
1. If required log in with your Slack credentials, and then select the destination channels for the notifications.
51
+
1. For**Custom Webhooks**, paste the URL of your Slack application.
52
+
1. Select the types of notifications to receive on Slack.
Codefresh can now post notifications to Slack, for example, notifications of successful and failed builds, and direct messages received within the Codefresh app.
32
65
33
66
##How Slack notifications work
34
67
35
68
When you have Slack integration enabled:
36
69
37
-
1. All pipelinesthat arelaunched automatically by[triggers]({{site.baseurl}}/docs/pipelines/triggers/) send Slack notifications
38
-
1. All pipelinesthat areexecuted manually do**NOT** send Slack notifications.
70
+
1. All pipelines launched automatically by[triggers]({{site.baseurl}}/docs/pipelines/triggers/), send Slack notifications
71
+
1. All pipelines executed manually, do**NOT** send Slack notifications.
39
72
40
73
You can override this behavior by toggling the checkbox**Report notification on pipeline execution** under**Advanced Settings**
41
74
either in a Git trigger dialog or the Run settings of a pipeline.
@@ -51,7 +84,7 @@ max-width="40%"
51
84
52
85
##Individual pipeline Slack integration
53
86
54
-
If you wish for more fine-grained control over Slack notifications, then take a look at any of the available slack plugins
87
+
If you wish for more fine-grained control over Slack notifications, then take a look at any of the available slack plugins: