Skip to content

Instantly share code, notes, and snippets.

@hawkw
Created June 13, 2018 22:50
Show Gist options
  • Save hawkw/e09c01434d424075c224bda6aa85115f to your computer and use it in GitHub Desktop.
Save hawkw/e09c01434d424075c224bda6aa85115f to your computer and use it in GitHub Desktop.
extremely useful slack annoying machine
#!/bin/bash
#
# Usage:
# $ ./eliza-build.sh docker whatever...
#
webhook_url="..." # i took this out so the entire internet can't send us slack messages...
eval "$@"
status=$?
message='{"text":"@eliza, your docker build failed! :cry:"}'
if [ $status -eq 0 ]; then
message='{"text":"@eliza, your tests passed :D"}'
fi
curl -X POST -H 'Content-type: application/json' --data "$message" "$webhook_url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment