Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/danielwhatmuff/notifybot
- Owner: danielwhatmuff
- Created: 2017-05-22T04:12:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T22:58:26.000Z (about 5 years ago)
- Last Synced: 2024-12-02T10:52:17.313Z (about 1 month ago)
- Topics: build-notifications, ci, deployment, devops, notifications, notify, python, slack, travis, travis-ci
- Language: Python
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
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)