Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Filter CIrcleCI build history by SSH rebuilds
#! /bin/bash
# This script pulls recent circleci build history, using jq to filter by ssh rebuilds, and printing the summary
# Requires `jq` and a CIRCLE_TOKEN
curl -sSL -u ${CIRCLE_TOKEN}: '${CCI_PROJECT}?offset=0&limit=100' | jq -r '.[] | select(.ssh_users != []) | [.build_url, .ssh_users[0].login] | @csv'
# alternately use for last N builds in all visible orgs based on users API token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.