Git Product home page Git Product logo

shippable-slack-notifier's Introduction

Slack notifier for Shippable

Simple Slack notifier for Shippable.

Usage

  • Setup a Slack channel
  • Go to http://YOUR_ORG_NAME.slack.com/admin, sign in
  • Click Add button near "Incoming WebHooks" integration listed in the "All services" tab
  • Select desired channel for notifications, confirm
  • Copy /services/ABCDEFGH/IJKLMNOP/12312312312312312321 part of Webhook URL information
  • Enable your project in Shippable
  • Go to the org dashboard or individual dashboard page from where you have enabled your project and click on ENCRYPT ENV VARIABLE button on the top right corner of the page. (More info...)
  • Enter the following into the text field: SLACK_URL=/services/ABCDEFGH/IJKLMNOP/12312312312312312321 where /services/ABCDEFGH/IJKLMNOP/12312312312312312321 was obtained before, click Encrypt
  • Copy the encrypted variable code that will appear
  • Paste it into your shippable.yml in your global env section
  • Add the following code to your shippable.yml:
after_failure:
  - sudo apt-get install wget -y; wget -O /tmp/notify.py http://mspanc.github.io/shippable-slack-notifier/notify.py; python /tmp/notify.py --slack-url $SLACK_URL --message failure
after_success:
  - sudo apt-get install wget -y; wget -O /tmp/notify.py http://mspanc.github.io/shippable-slack-notifier/notify.py; python /tmp/notify.py --slack-url $SLACK_URL --message success

Sample shippable.yml

language: node_js

env:
  global:
    - secure: YLnGRwHdeDhzxuw123123213213621873872136782163781267836781263781232187398217398271983789217389212wRNJODyNYAXtxg2o2ndYWkETaDSpn6r7ZSpQCV7iQ9YJJHdJB3gPFNOC/rWaBLm0lYhq6NveNjJGeOxf9RClvzdYkVQzzOvyPj/flQtHjiMPonKeQ2/gUJvBVXvR/dPmn3sq1POXVjeRnYZ5WoPqFzH8rSj/B4pEVxWX4Se//ZGg2webmh9OuqSFN7uNW1xytvH3VRzcbBXMSHScSXzOyxvBLGjuuuDFc9s5qTwqa8idtPCa6ORWg==

after_failure:
  - sudo apt-get install wget -y; wget -O /tmp/notify.py http://mspanc.github.io/shippable-slack-notifier/notify.py; python /tmp/notify.py --slack-url $SLACK_URL --message failure
after_success:
  - sudo apt-get install wget -y; wget -O /tmp/notify.py http://mspanc.github.io/shippable-slack-notifier/notify.py; python /tmp/notify.py --slack-url $SLACK_URL --message success

node_js:
  - 0.10
  - 0.12

build_image: shippableimages/ubuntu1404_nodejs

before_install:
  - source ~/.nvm/nvm.sh && nvm install $SHIPPABLE_NODE_VERSION
  - node --version

install:
  - npm install

script:
  - npm run spec

License

MIT

Authors

Marcin Lewandowski

shippable-slack-notifier's People

Contributors

mspanc avatar philipn avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.