Buildkite · Arazzo Workflow

Buildkite Trigger And Poll Build

Version 1.0.0

Create a build on a pipeline, then poll until it reaches a terminal state.

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

Provider

buildkite-com

Workflows

trigger-and-poll-build
Create a build and poll it to completion.
Triggers a build on the supplied pipeline for a commit and branch, then repeatedly fetches the build until it reaches a terminal state, surfacing the final state, build number and web URL.
3 steps inputs: branch, commit, message, org, pipeline outputs: buildNumber, finalState, webUrl
1
createBuild
Create a new build on the pipeline for the supplied commit and branch.
2
pollBuild
Fetch the build record and check whether it has left the running and scheduled states; loop back while it is still in progress.
3
classifyResult
Re-read the finished build so the terminal state is captured as the workflow result.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Buildkite Trigger And Poll Build
  summary: Create a build on a pipeline, then poll until it reaches a terminal state.
  description: >-
    The core continuous integration loop for Buildkite Pipelines. The workflow
    creates a new build on an existing pipeline for a given commit and branch,
    captures the returned build number, and then polls the build record on an
    interval until it leaves the running and scheduled states. When the build
    finishes it branches on the final state so callers can react to a passing or
    failing result. 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: trigger-and-poll-build
  summary: Create a build and poll it to completion.
  description: >-
    Triggers a build on the supplied pipeline for a commit and branch, then
    repeatedly fetches the build until it reaches a terminal state, surfacing the
    final state, build number and web URL.
  inputs:
    type: object
    required:
    - org
    - pipeline
    - commit
    - branch
    properties:
      org:
        type: string
        description: Organization slug that owns the pipeline.
      pipeline:
        type: string
        description: Pipeline slug to create the build on.
      commit:
        type: string
        description: Git commit SHA (or HEAD) to build.
      branch:
        type: string
        description: Git branch to build.
      message:
        type: string
        description: Optional build message shown in the Buildkite UI.
  steps:
  - stepId: createBuild
    description: >-
      Create a new build on the pipeline for the supplied commit and branch.
    operationId: createBuild
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: pipeline
      in: path
      value: $inputs.pipeline
    requestBody:
      contentType: application/json
      payload:
        commit: $inputs.commit
        branch: $inputs.branch
        message: $inputs.message
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      buildNumber: $response.body#/number
      buildId: $response.body#/id
      buildState: $response.body#/state
  - stepId: pollBuild
    description: >-
      Fetch the build record and check whether it has left the running and
      scheduled states; loop back while it is still in progress.
    operationId: getBuild
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: pipeline
      in: path
      value: $inputs.pipeline
    - name: number
      in: path
      value: $steps.createBuild.outputs.buildNumber
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      buildState: $response.body#/state
      webUrl: $response.body#/web_url
      finishedAt: $response.body#/finished_at
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollBuild
      criteria:
      - context: $response.body
        condition: $.state == "running" || $.state == "scheduled"
        type: jsonpath
    - name: finished
      type: goto
      stepId: classifyResult
      criteria:
      - context: $response.body
        condition: $.state != "running" && $.state != "scheduled"
        type: jsonpath
  - stepId: classifyResult
    description: >-
      Re-read the finished build so the terminal state is captured as the
      workflow result.
    operationId: getBuild
    parameters:
    - name: org
      in: path
      value: $inputs.org
    - name: pipeline
      in: path
      value: $inputs.pipeline
    - name: number
      in: path
      value: $steps.createBuild.outputs.buildNumber
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      finalState: $response.body#/state
      webUrl: $response.body#/web_url
  outputs:
    buildNumber: $steps.createBuild.outputs.buildNumber
    finalState: $steps.classifyResult.outputs.finalState
    webUrl: $steps.classifyResult.outputs.webUrl

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-trigger-and-poll-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.