Buildkite · Arazzo Workflow

Buildkite Rebuild Latest Build

Version 1.0.0

Find the most recent build on a pipeline, rebuild it, then poll the new build.

1 workflow 1 source API 1 provider
View Spec View on GitHub CI/CDContinuous IntegrationContinuous DeliveryDevOpsPipelinesHybrid CIBuild AutomationTest EnginePackage RegistriesAgentsGraphQLRESTMCPWebhookArazzoWorkflows

Provider

buildkite-com

Workflows

rebuild-latest-build
Rebuild the most recent build of a pipeline and poll it.
Lists builds for a pipeline, rebuilds the most recent one, and polls the resulting build to completion.
3 steps inputs: org, pipeline outputs: finalState, newBuildNumber, rebuiltFromNumber
1
listBuilds
List builds for the pipeline and capture the most recent build number.
2
rebuild
Rebuild the most recent build, re-queuing a new build from the same commit and configuration.
3
pollRebuild
Poll the new build until it leaves the running and scheduled states.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Buildkite Rebuild Latest Build
  summary: Find the most recent build on a pipeline, rebuild it, then poll the new build.
  description: >-
    A re-run flow that re-queues the newest build of a pipeline. The workflow
    lists builds for the pipeline, takes the first (most recent) build number,
    issues a rebuild that creates a fresh build from the same commit and
    configuration, and then polls the new build until it reaches a terminal
    state. This is useful for re-running against an unchanged commit after a
    transient infrastructure issue. Every step spells out its request inline so
    the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: buildsApi
  url: ../openapi/buildkite-com-builds-api-openapi.yml
  type: openapi
workflows:
- workflowId: rebuild-latest-build
  summary: Rebuild the most recent build of a pipeline and poll it.
  description: >-
    Lists builds for a pipeline, rebuilds the most recent one, and polls the
    resulting build to completion.
  inputs:
    type: object
    required:
    - org
    - pipeline
    properties:
      org:
        type: string
        description: Organization slug that owns the pipeline.
      pipeline:
        type: string
        description: Pipeline slug to rebuild the latest build of.
  steps:
  - stepId: listBuilds
    description: >-
      List builds for the pipeline and capture the most recent build number.
    operationId: listBuilds
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: pipeline
      in: path
      value: $inputs.pipeline
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      latestNumber: $response.body#/0/number
      latestState: $response.body#/0/state
  - stepId: rebuild
    description: >-
      Rebuild the most recent build, re-queuing a new build from the same commit
      and configuration.
    operationId: rebuildBuild
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: pipeline
      in: path
      value: $inputs.pipeline
    - name: number
      in: path
      value: $steps.listBuilds.outputs.latestNumber
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      newBuildNumber: $response.body#/number
      newBuildState: $response.body#/state
      webUrl: $response.body#/web_url
  - stepId: pollRebuild
    description: >-
      Poll the new build until it leaves the running and scheduled states.
    operationId: getBuild
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: pipeline
      in: path
      value: $inputs.pipeline
    - name: number
      in: path
      value: $steps.rebuild.outputs.newBuildNumber
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      finalState: $response.body#/state
      webUrl: $response.body#/web_url
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollRebuild
      criteria:
      - context: $response.body
        condition: $.state == "running" || $.state == "scheduled"
        type: jsonpath
  outputs:
    rebuiltFromNumber: $steps.listBuilds.outputs.latestNumber
    newBuildNumber: $steps.rebuild.outputs.newBuildNumber
    finalState: $steps.pollRebuild.outputs.finalState

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/buildkite-com-rebuild-latest-build-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.