Skip to content

Instantly share code, notes, and snippets.

@mclarke47
Created July 4, 2017 13:11
Show Gist options
  • Save mclarke47/64343a0831aac4c8ffb2bc0c03a2783a to your computer and use it in GitHub Desktop.
Save mclarke47/64343a0831aac4c8ffb2bc0c03a2783a to your computer and use it in GitHub Desktop.
get last successful or fixed circleci build number
curl -s https://circleci.com/api/v1.1/project/github/user/repo?circle-token=<token> | jq '[.[] | select(.status=="success" or .status=="fixed")] | max_by(.build_num).build_num'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment