0.1.2 • Published 5 years ago

bitbucket-pipeline-slack-notifier v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Script for sending notification to slack from Bitbucket pipelines in the cases where you cannot utilize the built in slack notification behavior in Bitbucket because of reasons.

Variables

  • -message 'This is the message that will show up in slack'
  • -team 'The name of the team that is responsible for this repo'
  • -channel 'The slack channel where the message should be sent'
  • -webhook 'The slack webhook url. This can be setup as a bitbucket pipeline secured variable called webhook or you can send it in as a command line argument'
  • -icon 'Must be a slack icon in the format :icon-name:'

Below is an example of how to use it in a pipeline.

# my-awesome-repo-thingys
image: node:8.10.0

pipelines:
  custom:
    Production:
      - step:
          caches:
            - node
          script:
            - npm install
            - npm run lint
            - npm test
            - node --max-old-space-size=8192 ./node_modules/.bin/serverless deploy -s prod -v
            - node ./node_modules/.bin/pnSlackNotifier -message 'Prod deployment successfully done!' -team 'Red Team' -channel '#deployments' -icon ':package:' -webhook 'htts://path-to-slack-webhook'
  branches:
    master:
      - step:
          caches:
            - node
          script:
            - npm install
            - npm run lint
            - npm test
            - node --max-old-space-size=8192 ./node_modules/.bin/serverless deploy -s test -v
            - ./node_modules/.bin/serverless s3deploy -s test
0.1.2

5 years ago