1.0.3 • Published 9 years ago
slack-ci-cli v1.0.3
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.jsonor in the command line to push descriptive build notifications to slack!No need for complex configuration, fuss with cURL or silly shell scripts.
Usage
- Get
incoming-webhookset up on Slack. - 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_URLslacklintfail --url=$SLACK_URL --humourslackbuildfail --url=$SLACK_URL -h