https://github.com/danielwhatmuff/bb-slack-notify
Notify slack when a Bitbucket pipeline deploys your code
https://github.com/danielwhatmuff/bb-slack-notify
Last synced: about 1 year ago
JSON representation
Notify slack when a Bitbucket pipeline deploys your code
- Host: GitHub
- URL: https://github.com/danielwhatmuff/bb-slack-notify
- Owner: danielwhatmuff
- Created: 2018-02-08T17:27:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-23T00:39:16.000Z (over 6 years ago)
- Last Synced: 2025-04-09T19:06:31.821Z (about 1 year ago)
- Language: Python
- Size: 55.7 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
Awesome Lists containing this project
README
# bb-slack-notify

## Overview
* Install and execute this CLI from within your Bitbucket Pipeline deployment steps to notify a Slack channel on deployment events.
* Note: It only works from within Bitbucket pipelines, as it reads from the provided [Environment Variables](https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html)
## Example bitbucket-pipelines.yml YAML
### Use a legacy API token
* Add your token or webhook URL as a secure environment variable within repository settings
```yaml
---
pipelines:
custom:
deploy-to-prod:
- step:
name: Deploy to prod, this can be triggered manually
script:
- python deploy_my_app.py
- pip install bb-slack-notify && bb-slack-notify -t $SLACK_TOKEN -c your-slack-channel -e prod
```
### Use an incoming webhook URL
```yaml
...
- pip install bb-slack-notify && bb-slack-notify -w $SLACK_WEBHOOK -c your-slack-channel -e prod
```
## Related docs
* [Webhooks](https://api.slack.com/incoming-webhooks)
* [API Tokens](https://api.slack.com/custom-integrations/legacy-tokens)
* [Bitbucket Pipelines](https://confluence.atlassian.com/bitbucket/configuring-your-pipeline-872013574.html)