Skip to content

Instantly share code, notes, and snippets.

@brandonhilkert
Forked from justincampbell/after.sh
Created March 1, 2013 18:39

Revisions

  1. @justincampbell justincampbell created this gist Mar 1, 2013.
    11 changes: 11 additions & 0 deletions after.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    if [[ $BUILD_STATUS == "success" ]]
    then
    export STATUS="success"
    else
    export STATUS="failure"
    fi

    curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
    -H "Content-Type: application/json" \
    -X POST \
    -d "{\"state\": \"$STATUS\", \"description\": \"Jenkins\", \"target_url\": \"http://my.jenkins.box.com/job/dividata/$BUILD_NUMBER/console\"}"
    4 changes: 4 additions & 0 deletions before.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
    -H "Content-Type: application/json" \
    -X POST \
    -d "{\"state\": \"pending\", \"description\": \"Jenkins\", \"target_url\": \"http://my.jenkins.box.com/job/dividata/$BUILD_NUMBER/console\"}"