CLI tool to post slack messages. Uses the node-stage tool for configuration.
yarn add slack-notify-cli@poviolabs/slack-notify-cli#v2
# update
yarn up slack-notify-cli@poviolabs/slack-notify-cli#v2
or install globally
npm i -g slack-notify-cli@poviolabs/slack-notify-cli#v2 --force
slackNotify: &slackNotify
channel: C03AXDS9F2B
autolinkPrefix: NS-
autolinkTarget: https://github.com/poviolabs/node-stage/issues/
commitPrefix: https://github.com/poviolabs/node-stage/commit/
projectName: NodeStage
stages:
myapp-prd:
slackNotify:
<<: *slackNotify
yarn slack-notify-cli --messageType success
yarn slack-notify-cli --messageType failure
yarn slack-notify-cli --messageType info --message A custom message!
Any text appended to the Slack message
The Slack channel to send the message to. Right-click copy url on the channel to find it. Example: C03AXDS9F2B
Version of the deploy. Tied to a specific Release and Stage combination.
If supplied with a semver format, the version will be prefixed with ${STAGE}
Prefix to detect the ticket id.
The url prefix that is generated for the ticket id.
The url that is generated for the commit sha.
Name of the project as presented in Slack.
Name of the branch deployed. Auto-detected from most CI/CD services.
Run and output the Slack template without actually sending the message.
More options can be found here.
# test with ts-node
yarn test:ts-node:cli --help
# build new version
yarn build
# test build
yarn test:cli --help