Skip to content

Instantly share code, notes, and snippets.

@masaki
Created December 20, 2011 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masaki/1500022 to your computer and use it in GitHub Desktop.
Save masaki/1500022 to your computer and use it in GitHub Desktop.
post build task: ikachan
#!/bin/sh
IKACHAN=http://example.com/ikachan
RESULT=`curl ${BUILD_URL}api/xml | perl -le '$_=<>;/<result>(.+?)</;printf "\x02\x0301,%02d%s\x0f",{A=>8,S=>3,F=>4}->{substr $1,0,1},$1'`
curl -F channel=\#jenkins -F message="Jenkins ($JOB_NAME): $RESULT - $BUILD_URL" $IKACHAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment