Created
August 24, 2017 15:33
-
-
Save rquadling/29d37938b1001345c643eb9832bfda7f to your computer and use it in GitHub Desktop.
Send an HTML message to HipChat using v1 of the api via cURL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MESSAGE=" | |
<table><thead><tr><td colspan=\"2\"><b>Build starting</b></td></tr></thead> | |
<tbody> | |
<tr><td><b>Tag</b></td><td>${build_tag}</td></tr> | |
<tr><td><b>Built for</b></td><td>${built_for}</td></tr> | |
<tr><td><b>Built by</b></td><td>${built_by}</td></tr> | |
</tbody> | |
</table> | |
" | |
curl -s -X POST \ | |
-F room_id=Developers \ | |
-F from=GitLab \ | |
-F message="$MESSAGE" \ | |
-F notify=1 \ | |
-F color=yellow \ | |
-F message_format=html \ | |
-F format=json \ | |
-F auth_token=xxxxxxxxx \ | |
https://api.hipchat.com/v1/rooms/message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment