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.
- 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
- 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