Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit 9f89acb

Browse files
chore: update notifications-engine (#274)
Signed-off-by: Ryota Sakamoto <[email protected]>
1 parent 567fe2a commit 9f89acb

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

docs/services/slack.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
![1](https://user-images.githubusercontent.com/426437/73604308-4cb0c500-4543-11ea-9092-6ca6bae21cbb.png)
55
1. Once application is created navigate to `Enter OAuth & Permissions`
66
![2](https://user-images.githubusercontent.com/426437/73604309-4d495b80-4543-11ea-9908-4dea403d3399.png)
7-
1. Click `Permissions` under `Add features and functionality` section and add `chat:write:bot` scope. To use the optional username and icon overrides in the Slack notification service also add the `chat:write.customize` scope.
7+
1. Click `Permissions` under `Add features and functionality` section and add `chat:write` scope. To use the optional username and icon overrides in the Slack notification service also add the `chat:write.customize` scope.
88
![3](https://user-images.githubusercontent.com/426437/73604310-4d495b80-4543-11ea-8576-09cd91aea0e5.png)
99
1. Scroll back to the top, click 'Install App to Workspace' button and confirm the installation.
1010
![4](https://user-images.githubusercontent.com/426437/73604311-4d495b80-4543-11ea-9155-9d216b20ec86.png)
1111
1. Once installation is completed copy the OAuth token.
1212
![5](https://user-images.githubusercontent.com/426437/73604312-4d495b80-4543-11ea-832b-a9d9d5e4bc29.png)
1313

1414
1. Create a public or private channel, for this example `my_channel`
15-
1. Add your bot to this channel **otherwise it won't work**
16-
9. Store token in argocd_notifications-secret Secret
15+
1. Invite your slack bot to this channel **otherwise slack bot won't be able to deliver notifications to this channel**
16+
8. Store Oauth access token in `argocd-notifications-secret` secret
1717

1818
```yaml
1919
apiVersion: v1
2020
kind: Secret
2121
metadata:
2222
name: <secret-name>
2323
stringData:
24-
slack-token: <auth-token>
24+
slack-token: <Oauth-access-token>
2525
```
2626
27-
10. Finally use the OAuth token to configure the Slack integration in the `argocd-notifications-secret` secret:
28-
27+
9. Define service type slack in data section of `argocd-notifications-cm` configmap:
28+
service
2929
```yaml
3030
apiVersion: v1
3131
kind: ConfigMap
@@ -39,7 +39,7 @@ data:
3939
icon: <override-icon> # optional icon for the message (supports both emoij and url notation)
4040
```
4141

42-
1. Create a subscription for your Slack integration:
42+
10. Add annotation in application yaml file to enable notifications for specific argocd app
4343

4444
```yaml
4545
apiVersion: argoproj.io/v1alpha1

docs/services/teams.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ metadata:
4848
4949
![](https://user-images.githubusercontent.com/18019529/114271500-9d2b8880-9a4c-11eb-85c1-f6935f0431d5.png)
5050
51-
Notification templates can be customized to leverage teams message sections, facts, themeColor, and potentialAction [feature](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using).
51+
Notification templates can be customized to leverage teams message sections, facts, themeColor, summary and potentialAction [feature](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using).
5252
5353
```yaml
5454
template.app-sync-succeeded: |
@@ -78,6 +78,7 @@ template.app-sync-succeeded: |
7878
}]
7979
title: Application {{.app.metadata.name}} has been successfully synced
8080
text: Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.
81+
summary: "{{.app.metadata.name}} sync succeeded"
8182
```
8283
8384
### facts field
@@ -108,4 +109,18 @@ You can set theme color as hex string for the message.
108109
template.app-sync-succeeded: |
109110
teams:
110111
themeColor: "#000080"
112+
```
113+
114+
### summary field
115+
116+
You can set a summary of the message that will be shown on Notifcation & Activity Feed
117+
118+
![](https://user-images.githubusercontent.com/6957724/116587921-84c4d480-a94d-11eb-9da4-f365151a12e7.jpg)
119+
120+
![](https://user-images.githubusercontent.com/6957724/116588002-99a16800-a94d-11eb-807f-8626eb53b980.jpg)
121+
122+
```yaml
123+
template.app-sync-succeeded: |
124+
teams:
125+
summary: "Sync Succeeded"
111126
```

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.16
44

55
require (
66
github.com/argoproj/argo-cd/v2 v2.0.0-rc3
7-
github.com/argoproj/notifications-engine v0.1.1-0.20210427222937-9766113a8ad7
7+
github.com/argoproj/notifications-engine v0.1.1-0.20210430041644-ddadc858f038
88
github.com/evanphx/json-patch v4.9.0+incompatible
99
github.com/ghodss/yaml v1.0.0
1010
github.com/golang/mock v1.4.4

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ github.com/argoproj/argo-cd/v2 v2.0.0-rc3 h1:jBuz8qqLL0gG6Nb892x3+eP+v/wjQpkdSOl
9393
github.com/argoproj/argo-cd/v2 v2.0.0-rc3/go.mod h1:Rw7fuyae0v8b3KMJoZp8jf5A2tBP2dQ8uWj9HTRZITo=
9494
github.com/argoproj/gitops-engine v0.3.1 h1:wM4RUzH54sWdchD7Ws8UdAIsjk08BmjN9bLuW79xKWk=
9595
github.com/argoproj/gitops-engine v0.3.1/go.mod h1:IBHhAkqlC+3r/wBWUitWSidQhPzlLoSTWp2htq3dyQk=
96-
github.com/argoproj/notifications-engine v0.1.1-0.20210427222937-9766113a8ad7 h1:8e1auDgpxpUAK0KucQ9V3YP8+5/wO0XDtlHyZWD5QY4=
97-
github.com/argoproj/notifications-engine v0.1.1-0.20210427222937-9766113a8ad7/go.mod h1:7H0/no9CwntTzJUvT54ICtVcmIlE92DM0tKxrufW0Bo=
96+
github.com/argoproj/notifications-engine v0.1.1-0.20210430041644-ddadc858f038 h1:C9ufEraYrgwH3uAbOtwJkrnosTB8ddrPUSRznbC1yXI=
97+
github.com/argoproj/notifications-engine v0.1.1-0.20210430041644-ddadc858f038/go.mod h1:7H0/no9CwntTzJUvT54ICtVcmIlE92DM0tKxrufW0Bo=
9898
github.com/argoproj/pkg v0.2.0 h1:ETgC600kr8WcAi3MEVY5sA1H7H/u1/IysYOobwsZ8No=
9999
github.com/argoproj/pkg v0.2.0/go.mod h1:F4TZgInLUEjzsWFB/BTJBsewoEy0ucnKSq6vmQiD/yc=
100100
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=

0 commit comments

Comments
 (0)