Skip to content

Instantly share code, notes, and snippets.

@subdigital
Created May 28, 2013 14:47
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 subdigital/5663295 to your computer and use it in GitHub Desktop.
Save subdigital/5663295 to your computer and use it in GitHub Desktop.
Update github branch status from Jenkins
gcli status create DeliRadio deliradio-web $GIT_COMMIT \
--params=state:pending \
target_url:$BUILD_URL \
description:"Build #$BUILD_NUMBER is running" \
-f csv
# Your build...
gcli status create DeliRadio deliradio-web $GIT_COMMIT \
--params=state:success \
target_url:$BUILD_URL \
description:"Build #$BUILD_NUMBER passed" \
-f csv
# Then a post-build action, which detects failure by scanning the output
gcli status create DeliRadio deliradio-web $GIT_COMMIT \
--params=state:failure \
target_url:$BUILD_URL \
description:"Build #$BUILD_NUMBER failed" \
-f csv
@subdigital
Copy link
Author

This script requires the github_cli gem: https://github.com/peter-murach/github_cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment