Skip to content

Notify slack when a Bitbucket pipeline deploys your code

Notifications You must be signed in to change notification settings

danielwhatmuff/bb-slack-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Notify slack when a Bitbucket pipeline deploys your code

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages