slack-ci-cli
v1.0.3
Published
CLI tool for sending success and failure CI notifications to slack. Name and shame! :P
Downloads
7
Maintainers
Readme
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
- Get
incoming-webhook
set 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_URL
slacklintfail --url=$SLACK_URL --humour
slackbuildfail --url=$SLACK_URL -h