@team-supercharge/jarvis-slack-notifier v1.2.0-feat-add-custom-message-command-69455808.0
JARVIS Slack Notifier
Node.js tool to provide Slack notifications through a Slack App to deliver JARVIS notifications
Getting Started
When installed as an NPM package, the tool exposes the jsn <command> binary to use with the following available commands:
jsn build-start- sends a Slack message containin release information about the currently built release (tag)jsn build-result- updates previous message based on theCI_JOB_STATUSvariable
different statuses can be notified manually as well:
jsn build-success- updates previous message with a success statejsn build-failed- updates previous message with a failed statejsn build-canceled- updates previous message with a canceled state
general commands:
jsn version- prints out version number
Usage
The recommended use of JARVIS Slack Notifier in a pletform-agnostic way is documented in the main JARVIS repository, access the latest version here!
In Node-based projects
If you are running a Node-based project you can add @team-supercharge/jarvis-slack-notifier to your devDependencies and use the commands with npx listed above, thus removing some extra build steps to be scheduled in your pipeline. For example if you have a single job producing your build:
build:
stage: build
script:
- npm ci # install package with "devDependencies"
- npx jsn build-start
- npm run build
after_script:
- npx jsn build-resultConfiguration
JARVIS Slack Notifier gets its configuration entirely from environment variables:
| variable | required | description |
|---|---|---|
JARVIS_SLACK_BOT_TOKEN | * | Slack App's bot token |
JARVIS_SLACK_SIGNING_SECRET | * | Slack App's signing secret |
JARVIS_SLACK_CHANNEL_ID | * | must be an ID, updating a message does not work with channel names |
JARVIS_SLACK_GROUP_EMOJI | emoji to use for project group (without colons) | |
JARVIS_SLACK_GITLAB_PRIVATE_TOKEN | use a private token instead of a job token (local testing) | |
JARVIS_SLACK_NO_RELEASE_CONTENT | if set to any value, no content (features, fixes, etc) sent |
On top of that the project relies on a handful of GitLab environment variables to be defined as seen in the .env.example file.
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago