Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danielwhatmuff/notifybot

Python CLI for notifying Slack of Travis CI deployments
https://github.com/danielwhatmuff/notifybot

build-notifications ci deployment devops notifications notify python slack travis travis-ci

Last synced: about 1 month ago
JSON representation

Python CLI for notifying Slack of Travis CI deployments

Awesome Lists containing this project

README

        

# deploybot
![](https://raw.githubusercontent.com/danielwhatmuff/notifybot/master/img/screenshot.png)

## Overview
* Install and execute this CLI from within your Travis jobs to notify a Slack channel on deployment events.
* Note: It only works from within Travis jobs, as it reads from the provided [Convenience Variables](https://docs.travis-ci.com/user/environment-variables/#Convenience-Variables)

## Example Travis YAML
### Be sure to encrypt your token or webhook URL
```bash
$ gem install travis
$ travis encrypt SLACK_TOKEN=yourtoken --add
$ travis encrypt SLACK_WEBHOOK=yourwebhook --add
```
### Use a legacy API token
```yaml
after_deploy:
- pip install notifybot && notifybot -t $SLACK_TOKEN -c your-slack-channel
```
### Use an incoming webhook URL
```yaml
after_deploy:
- pip install notifybot && notifybot -w $SLACK_WEBHOOK -c your-slack-channel
```

## Related docs
* [Webhooks](https://api.slack.com/incoming-webhooks)
* [API Tokens](https://api.slack.com/custom-integrations/legacy-tokens)
* [Travis Build Docs](https://docs.travis-ci.com/user/customizing-the-build)