Skip to content

JAR command-line app to post message to slack channel

Notifications You must be signed in to change notification settings

h4ck4life/slack-post-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Description

The main motivation of this jar program is to be used within cli environment to post build status message to slack channel. Though however it could be used in any purposes as seem to fit.

How to use

  • Download latest release of jar file from here
  • Before running the jar, please make sure to configure below environment variables:
    • SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxxxx/xxxxx/xxxxxxx
    • SLACK_TOKEN=xoxp-xxxxxxxxxxxxxx
  • Run the jar file like below:
    • java -jar slack-cli-0.0.1.jar

Example

  • Simple text message:
java -jar slack-cli-0.0.1.jar --channel dev --message "test message"
  • Text message with attachment:
java -jar slack-cli-0.0.1.jar --channel dev --message "test message" --file ./demo.txt

About

JAR command-line app to post message to slack channel

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages