- 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
- Add your token or webhook URL as a secure environment variable within repository settings
---
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
...
- pip install bb-slack-notify && bb-slack-notify -w $SLACK_WEBHOOK -c your-slack-channel -e prod