Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 10, 2019. It is now read-only.
/pluginsPublic archive

Commit2be64a3

Browse files
Merge pull request#28 from codefresh-io/slack-notifier
add new slack to plugin system
2 parents668e63a +b153bf5 commit2be64a3

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

‎plugins/slack-notifier/NOTES.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
##Notes

‎plugins/slack-notifier/README.md‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#Codefresh Slack Plugin
2+
3+
Use Codefresh Slack plugin to send a message to a channel.
4+
5+
##Usage
6+
7+
Simple mode - just send text or attachment to slack channel
8+
9+
```yaml
10+
---
11+
version:'1.0'
12+
13+
steps:
14+
15+
...
16+
17+
SendToSlack:
18+
title:Sending message to slack
19+
image:codefresh/slacknotifier
20+
environment:
21+
-SLACK_WEBHOOK_URL=${{SLACK_HOOK_URL}}
22+
-SLACK_TEXT=${{SLACK_TEXT}}
23+
-SLACK_ATTACHMENTS=${{SLACK_ATTACHMENTS}}
24+
...
25+
26+
```
27+
28+
Template mode - ability to have one template body and just override fields
29+
30+
```yaml
31+
---
32+
version:'1.0'
33+
34+
steps:
35+
36+
...
37+
38+
SendToSlack:
39+
title:Sending message to slack
40+
image:codefresh/slacknotifier
41+
environment:
42+
-SLACK_HOOK_URL=${{SLACK_HOOK_URL}}
43+
-SLACK_TEXT=cool
44+
-SLACK_TEMPLATE_FIELDS=${{SLACK_TEMPLATE_FIELDS}}
45+
-SLACK_TEMPLATE_BODY=${{SLACK_TEMPLATE_BODY}}
46+
-MODE=template
47+
...
48+
49+
```
50+
51+
52+
##Environment Variables
53+
54+
-**required**`WEBHOOK_URL` - Url to the channel. Slack official[docs](https://api.slack.com/incoming-webhooks)
55+
-**required**`SLACK_TEXT` - The message that will be sent
56+
-`SLACK_ATTACHMENTS` - print verbose output
57+
-`MODE` - template | simple mode
58+
-`SLACK_TEMPLATE_FIELDS` - fields for override if use template mode
59+
-`SLACK_TEMPLATE_BODY` - message body if use template mode

‎plugins/slack-notifier/plugin.yaml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
image:codefresh/slacknotifier
2+
version:latest
3+
description:Send message to slack channel
4+
keywords:
5+
-slack
6+
home:https://github.com/codefresh-io/slack-notifier
7+
sources:
8+
-https://github.com/codefresh-io/slack-notifier
9+
maintainers:# (optional)
10+
-name:Pavel Kostohrys
11+
email:pavel@codefresh.io
12+
icon:https://upload.wikimedia.org/wikipedia/commons/7/76/Slack_Icon.png
13+
envs:
14+
-name:SLACK_HOOK_URL
15+
type:required
16+
description:Url to the channel
17+
-name:SLACK_TEXT
18+
type:required
19+
description:Message to send
20+
-name:SLACK_ATTACHMENTS
21+
description:Attachments to send. Documentation https://api.slack.com/docs/message-attachments
22+
-name:MODE
23+
description:template | simple, by default simple. In case with template mode you can have general body in attachment SLACK_TEMPLATE_BODY and different fields SLACK_TEMPLATE_FIELDS
24+
-name:SLACK_TEMPLATE_BODY
25+
type:required
26+
description:Required in template mode, general body, should be not array. Support only one attachment in body. Documentation https://api.slack.com/docs/message-attachments
27+
-name:SLACK_TEMPLATE_FIELDS
28+
type:required
29+
description:Required in template mode, Override fields in SLACK_TEMPLATE_BODY, should be array. Documentation https://api.slack.com/docs/message-attachments

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp