1.0.3 • Published 8 years ago

slack-ci-cli v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Slack Continuous Integration CLI

This tool is intended to be used in conjunction with a CI system.

When a build is successful, or a failure, simply call the CLI command in your package.json or in the command line to push descriptive build notifications to slack!

No need for complex configuration, fuss with cURL or silly shell scripts.

Usage

  1. Get incoming-webhook set up on Slack.
  2. Install this plugin with npm install slack-ci-cli. You can also install this globally if you wish to use it within a Bitbucket Pipelines or Jenkins build script. It will still work.

You can use this in package.json scripts or run straight from a command line tool such as bash

slacksuccess --url=[YOUR_SLACK_URL_HERE]
slackbuildfail --url=[YOUR_SLACK_URL_HERE]
slacktestfail --url=[YOUR_SLACK_URL_HERE]
slackdeployfail --url=[YOUR_SLACK_URL_HERE]
slacklintfail --url=[YOUR_SLACK_URL_HERE]

You can add the optional --humour flag or -h to add a bit of flavour to your build messages :)

Examples

It's generally good to store the Slack URL in a configuration variable if possible.

slacksuccess --url=$SLACK_URL
slacklintfail --url=$SLACK_URL --humour
slackbuildfail --url=$SLACK_URL -h