Skip to content

Instantly share code, notes, and snippets.

View brookslyrette's full-sized avatar
🏠
Working from home from now until forever.

Brooks Lyrette brookslyrette

🏠
Working from home from now until forever.
View GitHub Profile
# specs and cukes results are stored in JUnit format under test-reports
if (grep 'Failures: [^0]' surefire-reports/* || grep 'Errors: [^0]' surefire-reports/*); then
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "failure", "description": "Build Failed!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
else
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "success", "description": "Build Passed", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
fi