0.0.3-self-notifications-0240bfb6.0 • Published 3 years ago

@team-supercharge/jarvis-slack-notifier v0.0.3-self-notifications-0240bfb6.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

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:

  • npx jsn build-start - sends a Slack message containin release information about the currently built release (tag)
  • npx jsn build-result - updates previous message based on the CI_JOB_STATUS variable

different statuses can be notified manually as well:

  • npx jsn build-success - updates previous message with a success state
  • npx jsn build-failed - updates previous message with a failed state
  • npx jsn build-canceled - updates previous message with a canceled state

Configuration

The JARVIS Slack Notifier gets its configuration entirely from environment variables:

variablerequireddescription
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_EMOJIemoji to use for project group (without colons)
JARVIS_SLACK_GITLAB_PRIVATE_TOKENuse a private token instead of a job token (local testing)

On top of that the project relies on a handful of GitLab environment variables to be defined as seen in the .env.example file.