bb-slack-notify

Slack Notifications for Bitbucket Pipeline deploys


Keywords
bitbucket, pipelines, deployment, slack, notification
License
MIT
Install
pip install bb-slack-notify==0.0.3

Documentation

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

Example bitbucket-pipelines.yml YAML

Use a legacy API token

  • 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

Use an incoming webhook URL

          ...
          - pip install bb-slack-notify && bb-slack-notify -w $SLACK_WEBHOOK -c your-slack-channel -e prod

Related docs