Skip to content

Commit 1750b1f

Browse files
committed
feat: slack docs
1 parent 1731b61 commit 1750b1f

File tree

1 file changed

+74
-1
lines changed
  • src/administration-guide/notifications

1 file changed

+74
-1
lines changed

src/administration-guide/notifications/slack.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,84 @@
55

66
# Slack notifications
77

8+
Slack notifications allow you to receive real-time updates about your Semaphore workflows directly in your Slack channels. This integration helps teams stay informed about build statuses, deployment results, and other important events without having to constantly check the Semaphore dashboard.
9+
10+
To set up Slack notifications, you need to create a webhook URL that connects Semaphore to your desired Slack channel. This webhook acts as a secure communication bridge between the two platforms.
11+
12+
## Creating Slack webhook
13+
14+
### Step 1. Open Slack API Settings
15+
16+
1. Go to [https://api.slack.com/apps](https://api.slack.com/apps).
17+
2. Click **Create New App** → choose **From Scratch**.
18+
3. Give your app a name (e.g., `Semaphore Bot`) and select your **Slack workspace**.
19+
20+
---
21+
22+
### Step 2. Enable Incoming Webhooks
23+
24+
1. Inside the app settings, go to **Features → Incoming Webhooks**.
25+
2. Switch **ctivate Incoming Webhooks****On**.
26+
27+
---
28+
29+
### Step 3. Create a Webhook URL
30+
31+
1. Click **dd New Webhook to Workspace**.
32+
2. Select the xxchannelxx where messages should be sent.
33+
3. Click **Allow**.
34+
4. You’ll see a **Webhook URL** like:
35+
36+
```
37+
https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx
38+
```
39+
40+
---
41+
42+
### Step 4. Test Your Webhook
43+
44+
Use `curl` to test:
45+
46+
```bash
47+
curl -X POST -H 'Content-type: application/json' \
48+
--data '{"text":"Hello from Semaphore UI 🚀"}' \
49+
https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx
50+
```
51+
52+
If everything is set up, you’ll see the message in the selected Slack channel.
53+
54+
55+
## Semaphore configuration
56+
57+
Once you have your Slack webhook URL, you can configure Semaphore to send notifications in several ways:
58+
59+
### Configuration Methods
60+
61+
You can enable Slack notifications using either configuration files or environment variables.
62+
63+
#### Method 1: Configuration File
64+
65+
Add the following settings to your Semaphore configuration file:
66+
67+
- `slack_alert`: Set to `true` to enable Slack notifications
68+
- `slack_url`: Your webhook URL from the previous step
69+
870
`config.json` example:
971

1072
```json
1173
{
1274
"slack_alert": true,
13-
"slack_url": "...",
75+
"slack_url": "https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx",
1476
}
77+
```
78+
79+
#### Method 2: Environment Variables
80+
81+
Alternatively, you can use environment variables to configure Slack notifications. This method is particularly useful for containerized deployments or when you want to keep sensitive information separate from configuration files.
82+
83+
Environemnt variables:
84+
85+
```
86+
SEMAPHORE_SLACK_ALERT=True
87+
SEMAPHORE_SLACK_URL=https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx
1588
```

0 commit comments

Comments
 (0)