Skip to content

Commit

Permalink
docs: Update readme and section about notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Dec 3, 2024
1 parent 6ebc9be commit 171cf63
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ Here's a short list of avaiable commands
* `scottyctl app:create` Create a new app
* `scottyctl app:destroy` Destroy a managed app
* `scottyctl app:info` Display some info about the app
* `scottyctl notify:add` Adds a new service to notify on app changes
* `scottyctl notify:remove` Removes a notification to a service

## Configuring the server

Expand Down Expand Up @@ -237,6 +239,48 @@ You can provide the information either via env-vars or by passing the
which then will be used as domain-names for the reverse-rpoxy
configuration.

## Notifications

Scotty supports notifications to other services, e.g. Gitlab, Mattermost or
via webhooks. Notifications recipients need to be configured on the server
side, but `scottyctl` can provide parameters to steer the delivery, e.g.
the channel-name for mattermost or the merge-request-id for gitlab.

Here's a config-sample-snippet for mattermost (Create an incoming webhook
and note down the hook_id):

```yaml
notification_services:
our-mattermost:
type: mattermost
host: https://chat.example.com
hook_id: xxx # Override with SCOTTY__NOTIFICATION_SERVICES__OUR_MATTERMOST__HOOK_ID
```
To enable notifications for an app, run

```bash
scottyctl notify:add <APP> --service-id mattermost://our-mattermost/my-custom-channel
```

Similar for gitlab (create a personal access token and note it down):


```yaml
notification_services:
our-gitlab:
type: gitlab
host: https://our.gitlab.com
token: xxx # Override with SCOTTY__NOTIFICATION_SERVICES__OUR_GITLAB__TOKEN
```
To enable notifications for an app, run

```bash
scottyctl notify:add <APP> --service-id gitlab://our-gitlab/my-group/my-project/3
```

This will add notes to the MR 3 of that particular project.


## Developing/ contributing

We welcome contributions! Please fork the repository, create a
Expand Down

0 comments on commit 171cf63

Please sign in to comment.