Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Grabbing a list of which Buildkite pipelines use which agent queues

Run this query via the graph explorer:

  organization(slug: "your-org-slug") {
    pipelines(first: 500) {
      edges {
        node {
          steps {

Copy paste the output from the right-side pane, save as jobs.json, then run:

cat jobs.json | jq -r '
.data.organization.pipelines.edges[] | 
{ name:, yaml: .node.steps.yaml } | 
(.yaml | match("queue\\s*=\\s*([^\\s]+)")) as $regex |
[.name, $regex.captures[0].string] 
| "\(.[0])\t\(.[1])"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment