{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/buildkite/latest.json",
  "title": "JSON schema for Buildkite pipeline configuration files",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json",
    "sourceSha256": "ccd18cb3456e184da076ae40ce917ef3cedd78a312dd3f07a6a7a2d5080c7ea9",
    "fileMatch": [
      "buildkite.yml",
      "buildkite.yaml",
      "buildkite.json",
      "buildkite.*.yml",
      "buildkite.*.yaml",
      "buildkite.*.json",
      "**/.buildkite/pipeline.yml",
      "**/.buildkite/pipeline.yaml",
      "**/.buildkite/pipeline.json",
      "**/.buildkite/pipeline.*.yml",
      "**/.buildkite/pipeline.*.yaml",
      "**/.buildkite/pipeline.*.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "env": {
      "$ref": "#/$defs/env"
    },
    "agents": {
      "$ref": "#/$defs/agents"
    },
    "notify": {
      "$ref": "#/$defs/buildNotify"
    },
    "image": {
      "$ref": "#/$defs/image"
    },
    "secrets": {
      "$ref": "#/$defs/secrets"
    },
    "priority": {
      "$ref": "#/$defs/priority"
    },
    "steps": {
      "$ref": "#/$defs/pipelineSteps"
    }
  },
  "required": [
    "steps"
  ],
  "$defs": {
    "allowDependencyFailure": {
      "enum": [
        true,
        false,
        "true",
        "false"
      ],
      "description": "Whether to proceed with this step and further steps if a step named in the depends_on attribute fails",
      "default": false
    },
    "image": {
      "type": "string",
      "description": "(Kubernetes stack only) The container image to use for this pipeline or step",
      "examples": [
        "node:18-alpine",
        "python:3.11",
        "ubuntu:22.04"
      ]
    },
    "allowedTeams": {
      "description": "A list of teams that are permitted to unblock this step, whose values are a list of one or more team slugs or IDs",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "examples": [
        "frontend-team",
        "96176d08-f503-413f-8423-96094953b9e7",
        [
          "frontend-team",
          "backend-team",
          "96176d08-f503-413f-8423-96094953b9e7"
        ]
      ]
    },
    "agents": {
      "oneOf": [
        {
          "$ref": "#/$defs/agentsObject"
        },
        {
          "$ref": "#/$defs/agentsList"
        }
      ]
    },
    "agentsObject": {
      "type": "object",
      "description": "Query rules to target specific agents",
      "examples": [
        {
          "queue": "deploy"
        },
        {
          "ruby": "2*"
        }
      ]
    },
    "agentsList": {
      "type": "array",
      "description": "Query rules to target specific agents in k=v format",
      "examples": [
        "queue=default",
        "xcode=true"
      ],
      "items": {
        "type": "string"
      }
    },
    "automaticRetry": {
      "type": "object",
      "properties": {
        "exit_status": {
          "description": "The exit status number that will cause this job to retry",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "*"
              ]
            },
            {
              "type": "integer"
            },
            {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          ]
        },
        "limit": {
          "type": "integer",
          "description": "The number of times this job can be retried",
          "minimum": 0,
          "maximum": 10
        },
        "signal": {
          "description": "The exit signal, if any, that may be retried",
          "type": "string",
          "examples": [
            "*",
            "none",
            "SIGKILL",
            "term"
          ]
        },
        "signal_reason": {
          "description": "The exit signal reason, if any, that may be retried",
          "type": "string",
          "enum": [
            "*",
            "none",
            "agent_incompatible",
            "agent_refused",
            "agent_stop",
            "cancel",
            "process_run_error",
            "signature_rejected",
            "stack_error"
          ]
        }
      },
      "additionalProperties": false
    },
    "branches": {
      "description": "Which branches will include this step in their builds",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "examples": [
        "master",
        [
          "feature/*",
          "chore/*"
        ]
      ]
    },
    "cache": {
      "description": "The paths for the caches to be used in the step",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "object",
          "properties": {
            "paths": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "size": {
              "type": "string",
              "pattern": "^\\d+g$"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "paths"
          ]
        }
      ],
      "examples": [
        "dist/",
        [
          ".build/*",
          "assets/*"
        ],
        {
          "name": "cool-cache",
          "size": "20g",
          "paths": [
            "/path/one",
            "/path/two"
          ]
        }
      ]
    },
    "cancelOnBuildFailing": {
      "enum": [
        true,
        false,
        "true",
        "false"
      ],
      "description": "Whether to cancel the job as soon as the build is marked as failing",
      "default": false
    },
    "dependsOnList": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "step": {
                "type": "string"
              },
              "allow_failure": {
                "enum": [
                  true,
                  false,
                  "true",
                  "false"
                ],
                "default": false
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "dependsOn": {
      "description": "The step keys for a step to depend on",
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/dependsOnList"
        }
      ]
    },
    "env": {
      "type": "object",
      "description": "Environment variables for this step",
      "examples": [
        {
          "NODE_ENV": "test"
        }
      ]
    },
    "if": {
      "type": "string",
      "description": "A boolean expression that omits the step when false",
      "examples": [
        "build.message != 'skip me'",
        "build.branch == 'master'"
      ]
    },
    "key": {
      "type": "string",
      "description": "A unique identifier for a step, must not resemble a UUID",
      "examples": [
        "deploy-staging",
        "test-integration"
      ],
      "maxLength": 100,
      "pattern": "^[a-zA-Z0-9_\\-:${}.,]+$",
      "not": {
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      }
    },
    "label": {
      "type": "string",
      "description": "The label that will be displayed in the pipeline visualisation in Buildkite. Supports emoji.",
      "examples": [
        ":docker: Build"
      ]
    },
    "notifySimple": {
      "type": "string",
      "enum": [
        "github_check",
        "github_commit_status"
      ]
    },
    "notifyEmail": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "if": {
          "$ref": "#/$defs/if"
        }
      },
      "additionalProperties": false
    },
    "notifyBasecamp": {
      "type": "object",
      "properties": {
        "basecamp_campfire": {
          "type": "string"
        },
        "if": {
          "$ref": "#/$defs/if"
        }
      },
      "additionalProperties": false
    },
    "notifySlackObject": {
      "type": "object",
      "properties": {
        "channels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "message": {
          "type": "string"
        }
      }
    },
    "notifySlack": {
      "type": "object",
      "properties": {
        "slack": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/notifySlackObject"
            }
          ]
        },
        "if": {
          "$ref": "#/$defs/if"
        }
      },
      "additionalProperties": false
    },
    "notifyWebhook": {
      "type": "object",
      "properties": {
        "webhook": {
          "type": "string"
        },
        "if": {
          "$ref": "#/$defs/if"
        }
      },
      "additionalProperties": false
    },
    "notifyPagerduty": {
      "type": "object",
      "properties": {
        "pagerduty_change_event": {
          "type": "string"
        },
        "if": {
          "$ref": "#/$defs/if"
        }
      },
      "additionalProperties": false
    },
    "notifyGithubCommitStatus": {
      "type": "object",
      "properties": {
        "github_commit_status": {
          "type": "object",
          "properties": {
            "context": {
              "description": "GitHub commit status name",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "if": {
          "$ref": "#/$defs/if"
        }
      },
      "additionalProperties": false
    },
    "notifyGithubCheck": {
      "type": "object",
      "properties": {
        "github_check": {
          "type": "object"
        }
      },
      "additionalProperties": false
    },
    "buildNotify": {
      "type": "array",
      "description": "Array of notification options for this step",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/notifySimple"
          },
          {
            "$ref": "#/$defs/notifyEmail"
          },
          {
            "$ref": "#/$defs/notifyBasecamp"
          },
          {
            "$ref": "#/$defs/notifySlack"
          },
          {
            "$ref": "#/$defs/notifyWebhook"
          },
          {
            "$ref": "#/$defs/notifyPagerduty"
          },
          {
            "$ref": "#/$defs/notifyGithubCommitStatus"
          },
          {
            "$ref": "#/$defs/notifyGithubCheck"
          }
        ]
      }
    },
    "textField": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The text input name",
          "examples": [
            "Release Name"
          ]
        },
        "key": {
          "type": "string",
          "description": "The meta-data key that stores the field's input",
          "pattern": "^[a-zA-Z0-9-_]+$",
          "examples": [
            "release-name"
          ]
        },
        "hint": {
          "type": "string",
          "description": "The explanatory text that is shown after the label",
          "examples": [
            "What’s the code name for this release? :name_badge:"
          ]
        },
        "format": {
          "type": "string",
          "description": "The format must be a regular expression implicitly anchored to the beginning and end of the input and is functionally equivalent to the HTML5 pattern attribute.",
          "format": "regex",
          "examples": [
            "[0-9a-f]+"
          ]
        },
        "required": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "default": true,
          "description": "Whether the field is required for form submission"
        },
        "default": {
          "type": "string",
          "description": "The value that is pre-filled in the text field",
          "examples": [
            "Flying Dolphin"
          ]
        }
      },
      "required": [
        "key"
      ],
      "additionalProperties": false
    },
    "selectFieldOption": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "The text displayed on the select list item",
          "examples": [
            "Stable"
          ]
        },
        "value": {
          "type": "string",
          "description": "The value to be stored as meta-data",
          "examples": [
            "stable"
          ]
        },
        "hint": {
          "type": "string",
          "description": "The text displayed directly under the select field’s label",
          "examples": [
            "Which release stream does this belong in? :fork:"
          ]
        },
        "required": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "default": true,
          "description": "Whether the field is required for form submission"
        }
      },
      "required": [
        "label",
        "value"
      ],
      "additionalProperties": false
    },
    "selectField": {
      "type": "object",
      "properties": {
        "select": {
          "type": "string",
          "description": "The text input name",
          "examples": [
            "Release Stream"
          ]
        },
        "key": {
          "type": "string",
          "description": "The meta-data key that stores the field's input",
          "pattern": "^[a-zA-Z0-9-_]+$",
          "examples": [
            "release-stream"
          ]
        },
        "default": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ],
          "description": "The value of the option(s) that will be pre-selected in the dropdown",
          "examples": [
            "beta",
            [
              "alpha",
              "beta"
            ]
          ]
        },
        "hint": {
          "type": "string",
          "description": "The explanatory text that is shown after the label",
          "examples": [
            "What’s the code name for this release? :name_badge:"
          ]
        },
        "multiple": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "description": "Whether more than one option may be selected",
          "default": false
        },
        "options": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/selectFieldOption"
          }
        },
        "required": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "default": true,
          "description": "Whether the field is required for form submission"
        }
      },
      "required": [
        "key",
        "options"
      ],
      "additionalProperties": false
    },
    "fields": {
      "type": "array",
      "description": "A list of input fields required to be filled out before unblocking the step",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/textField"
          },
          {
            "$ref": "#/$defs/selectField"
          }
        ]
      }
    },
    "ifChanged": {
      "description": "Agent-applied attribute: A glob pattern that omits the step from a build if it does not match any files changed in the build. Can be a single pattern, list of patterns, or an object with include/exclude attributes.",
      "oneOf": [
        {
          "type": "string",
          "description": "A single glob pattern",
          "examples": [
            "**.go",
            "go.{mod,sum}",
            "{app/**,spec/**}"
          ]
        },
        {
          "type": "array",
          "description": "A list of glob patterns",
          "items": {
            "type": "string"
          },
          "examples": [
            [
              "**.go",
              "go.{mod,sum}"
            ],
            [
              "app/**",
              "spec/**"
            ]
          ]
        },
        {
          "type": "object",
          "description": "An object with include and optional exclude patterns",
          "properties": {
            "include": {
              "description": "Pattern or list of patterns to include",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "exclude": {
              "description": "Pattern or list of patterns to exclude",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          },
          "required": [
            "include"
          ],
          "additionalProperties": false
        }
      ]
    },
    "matrixElement": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        },
        {
          "type": "boolean"
        }
      ]
    },
    "prompt": {
      "type": "string",
      "description": "The instructional message displayed in the dialog box when the unblock step is activated",
      "examples": [
        "Release to production?"
      ]
    },
    "skip": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string",
          "maxLength": 70
        }
      ],
      "description": "Whether this step should be skipped. Passing a string provides a reason for skipping this command",
      "examples": [
        true,
        false,
        "My reason"
      ]
    },
    "secrets": {
      "description": "A list of secret names or a mapping of environment variable names to secret names to be made available to the build or step",
      "anyOf": [
        {
          "type": "array",
          "description": "A list of secret names to be made available as environment variables",
          "items": {
            "type": "string"
          },
          "examples": [
            [
              "API_ACCESS_TOKEN"
            ],
            [
              "API_KEY",
              "DATABASE_PASSWORD"
            ]
          ]
        },
        {
          "type": "object",
          "description": "A mapping of custom environment variable names to Buildkite secret names",
          "examples": [
            {
              "MY_APP_ACCESS_TOKEN": "API_ACCESS_TOKEN"
            },
            {
              "CUSTOM_API_KEY": "API_KEY",
              "CUSTOM_DB_PASSWORD": "DATABASE_PASSWORD"
            }
          ],
          "additionalProperties": {
            "type": "string"
          }
        }
      ]
    },
    "softFailObject": {
      "type": "object",
      "properties": {
        "exit_status": {
          "description": "The exit status number that will cause this job to soft-fail",
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "*"
              ]
            },
            {
              "type": "integer"
            }
          ]
        }
      }
    },
    "softFailList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/softFailObject"
      }
    },
    "softFail": {
      "description": "The conditions for marking the step as a soft-fail.",
      "anyOf": [
        {
          "enum": [
            true,
            false,
            "true",
            "false"
          ]
        },
        {
          "$ref": "#/$defs/softFailList"
        }
      ]
    },
    "blockStep": {
      "type": "object",
      "properties": {
        "allow_dependency_failure": {
          "$ref": "#/$defs/allowDependencyFailure"
        },
        "block": {
          "type": "string",
          "description": "The label of the block step"
        },
        "blocked_state": {
          "type": "string",
          "default": "passed",
          "description": "The state that the build is set to when the build is blocked by this block step",
          "enum": [
            "passed",
            "failed",
            "running"
          ]
        },
        "branches": {
          "$ref": "#/$defs/branches"
        },
        "depends_on": {
          "$ref": "#/$defs/dependsOn"
        },
        "fields": {
          "$ref": "#/$defs/fields"
        },
        "if": {
          "$ref": "#/$defs/if"
        },
        "key": {
          "$ref": "#/$defs/key"
        },
        "identifier": {
          "$ref": "#/$defs/blockStep/properties/key"
        },
        "id": {
          "$ref": "#/$defs/blockStep/properties/key",
          "deprecated": true
        },
        "label": {
          "$ref": "#/$defs/blockStep/properties/block"
        },
        "name": {
          "$ref": "#/$defs/blockStep/properties/block"
        },
        "prompt": {
          "$ref": "#/$defs/prompt"
        },
        "allowed_teams": {
          "$ref": "#/$defs/allowedTeams"
        },
        "type": {
          "type": "string",
          "enum": [
            "block"
          ]
        }
      },
      "additionalProperties": false
    },
    "nestedBlockStep": {
      "type": "object",
      "properties": {
        "block": {
          "$ref": "#/$defs/blockStep"
        }
      },
      "additionalProperties": false
    },
    "stringBlockStep": {
      "type": "string",
      "description": "Pauses the execution of a build and waits on a user to unblock it",
      "enum": [
        "block"
      ]
    },
    "inputStep": {
      "type": "object",
      "properties": {
        "allow_dependency_failure": {
          "$ref": "#/$defs/allowDependencyFailure"
        },
        "input": {
          "type": "string",
          "description": "The label of the input step"
        },
        "branches": {
          "$ref": "#/$defs/branches"
        },
        "depends_on": {
          "$ref": "#/$defs/dependsOn"
        },
        "fields": {
          "$ref": "#/$defs/fields"
        },
        "blocked_state": {
          "type": "string",
          "default": "passed",
          "description": "The state that the build is set to when the build is blocked by this input step",
          "enum": [
            "passed",
            "failed",
            "running"
          ]
        },
        "if": {
          "$ref": "#/$defs/if"
        },
        "key": {
          "$ref": "#/$defs/key"
        },
        "identifier": {
          "$ref": "#/$defs/inputStep/properties/key"
        },
        "id": {
          "$ref": "#/$defs/inputStep/properties/key",
          "deprecated": true
        },
        "label": {
          "$ref": "#/$defs/inputStep/properties/input"
        },
        "name": {
          "$ref": "#/$defs/inputStep/properties/input"
        },
        "prompt": {
          "$ref": "#/$defs/prompt"
        },
        "allowed_teams": {
          "$ref": "#/$defs/allowedTeams"
        },
        "type": {
          "type": "string",
          "enum": [
            "input"
          ]
        }
      },
      "additionalProperties": false
    },
    "nestedInputStep": {
      "type": "object",
      "properties": {
        "input": {
          "$ref": "#/$defs/inputStep"
        }
      },
      "additionalProperties": false
    },
    "stringInputStep": {
      "type": "string",
      "description": "Pauses the execution of a build and waits on a user to unblock it",
      "enum": [
        "input"
      ]
    },
    "matrixElementList": {
      "type": "array",
      "description": "List of elements for single-dimension Build Matrix",
      "items": {
        "$ref": "#/$defs/matrixElement"
      },
      "examples": [
        [
          "linux",
          "freebsd"
        ]
      ]
    },
    "matrixSetup": {
      "oneOf": [
        {
          "$ref": "#/$defs/matrixElementList"
        },
        {
          "type": "object",
          "description": "Mapping of Build Matrix dimension names to their lists of elements",
          "propertyNames": {
            "type": "string",
            "description": "Build Matrix dimension name",
            "pattern": "^[a-zA-Z0-9_]+$"
          },
          "examples": [
            {
              "os": [
                "linux",
                "freebsd"
              ],
              "arch": [
                "arm64",
                "riscv"
              ]
            }
          ],
          "additionalProperties": {
            "type": "array",
            "description": "List of elements for this Build Matrix dimension",
            "items": {
              "$ref": "#/$defs/matrixElement"
            }
          }
        }
      ]
    },
    "matrixAdjustmentsWithObject": {
      "type": "object",
      "description": "Specification of a new or existing Build Matrix combination",
      "propertyNames": {
        "type": "string",
        "description": "Build Matrix dimension name"
      },
      "examples": [
        {
          "os": "linux",
          "arch": "arm64"
        }
      ],
      "additionalProperties": {
        "type": "string",
        "description": "Build Matrix dimension element"
      }
    },
    "matrixAdjustments": {
      "type": "object",
      "description": "An adjustment to a Build Matrix",
      "properties": {
        "with": {
          "oneOf": [
            {
              "$ref": "#/$defs/matrixElementList"
            },
            {
              "$ref": "#/$defs/matrixAdjustmentsWithObject"
            }
          ]
        },
        "skip": {
          "$ref": "#/$defs/skip"
        },
        "soft_fail": {
          "$ref": "#/$defs/softFail"
        }
      },
      "required": [
        "with"
      ]
    },
    "matrixObject": {
      "type": "object",
      "description": "Configuration for multi-dimension Build Matrix",
      "properties": {
        "setup": {
          "$ref": "#/$defs/matrixSetup"
        },
        "adjustments": {
          "type": "array",
          "description": "List of Build Matrix adjustments",
          "items": {
            "$ref": "#/$defs/matrixAdjustments"
          }
        }
      },
      "required": [
        "setup"
      ]
    },
    "matrix": {
      "oneOf": [
        {
          "$ref": "#/$defs/matrixElementList"
        },
        {
          "$ref": "#/$defs/matrixObject"
        }
      ]
    },
    "commandStepCommand": {
      "description": "The commands to run on the agent",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "string"
        }
      ]
    },
    "commandStepNotify": {
      "type": "array",
      "description": "Array of notification options for this step",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/notifySimple"
          },
          {
            "$ref": "#/$defs/notifyBasecamp"
          },
          {
            "$ref": "#/$defs/notifySlack"
          },
          {
            "$ref": "#/$defs/notifyGithubCommitStatus"
          },
          {
            "$ref": "#/$defs/notifyGithubCheck"
          }
        ]
      }
    },
    "pluginsList": {
      "type": "array",
      "description": "Array of plugins for this step",
      "items": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "maxProperties": 1,
            "examples": [
              {
                "docker-compose#v1.0.0": {
                  "run": "app"
                }
              }
            ]
          }
        ]
      }
    },
    "pluginsObject": {
      "type": "object",
      "description": "A map of plugins for this step. Deprecated: please use the array syntax.",
      "deprecated": true
    },
    "plugins": {
      "anyOf": [
        {
          "$ref": "#/$defs/pluginsList"
        },
        {
          "$ref": "#/$defs/pluginsObject"
        }
      ]
    },
    "automaticRetryList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/automaticRetry"
      }
    },
    "commandStepAutomaticRetry": {
      "anyOf": [
        {
          "enum": [
            true,
            false,
            "true",
            "false"
          ]
        },
        {
          "$ref": "#/$defs/automaticRetry"
        },
        {
          "$ref": "#/$defs/automaticRetryList"
        }
      ],
      "description": "Whether to allow a job to retry automatically. If set to true, the retry conditions are set to the default value.",
      "default": [
        {
          "exit_status": "*",
          "limit": 2
        }
      ]
    },
    "commandStepManualRetryObject": {
      "type": "object",
      "properties": {
        "allowed": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "description": "Whether or not this job can be retried manually",
          "default": true
        },
        "permit_on_passed": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "description": "Whether or not this job can be retried after it has passed",
          "default": true
        },
        "reason": {
          "type": "string",
          "description": "A string that will be displayed in a tooltip on the Retry button in Buildkite. This will only be displayed if the allowed attribute is set to false.",
          "examples": [
            "No retries allowed on deploy steps"
          ]
        }
      },
      "additionalProperties": false
    },
    "commandStepManualRetry": {
      "description": "Whether to allow a job to be retried manually",
      "anyOf": [
        {
          "enum": [
            true,
            false,
            "true",
            "false"
          ]
        },
        {
          "$ref": "#/$defs/commandStepManualRetryObject"
        }
      ],
      "default": true
    },
    "commandStep": {
      "type": "object",
      "properties": {
        "agents": {
          "$ref": "#/$defs/agents"
        },
        "allow_dependency_failure": {
          "$ref": "#/$defs/allowDependencyFailure"
        },
        "artifact_paths": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ],
          "description": "The glob path/s of artifacts to upload once this step has finished running",
          "examples": [
            [
              "screenshots/*"
            ],
            [
              "dist/myapp.zip",
              "dist/myapp.tgz"
            ]
          ]
        },
        "branches": {
          "$ref": "#/$defs/branches"
        },
        "cache": {
          "$ref": "#/$defs/cache"
        },
        "cancel_on_build_failing": {
          "$ref": "#/$defs/cancelOnBuildFailing"
        },
        "command": {
          "$ref": "#/$defs/commandStepCommand"
        },
        "commands": {
          "$ref": "#/$defs/commandStepCommand"
        },
        "concurrency": {
          "type": "integer",
          "description": "The maximum number of jobs created from this step that are allowed to run at the same time. If you use this attribute, you must also define concurrency_group.",
          "examples": [
            1
          ]
        },
        "concurrency_group": {
          "type": "string",
          "description": "A unique name for the concurrency group that you are creating with the concurrency attribute",
          "examples": [
            "my-pipeline/deploy"
          ]
        },
        "concurrency_method": {
          "type": "string",
          "enum": [
            "ordered",
            "eager"
          ],
          "description": "Control command order, allowed values are 'ordered' (default) and 'eager'.  If you use this attribute, you must also define concurrency_group and concurrency.",
          "examples": [
            "ordered"
          ]
        },
        "depends_on": {
          "$ref": "#/$defs/dependsOn"
        },
        "env": {
          "$ref": "#/$defs/env"
        },
        "if": {
          "$ref": "#/$defs/if"
        },
        "if_changed": {
          "$ref": "#/$defs/ifChanged"
        },
        "key": {
          "$ref": "#/$defs/key"
        },
        "identifier": {
          "$ref": "#/$defs/commandStep/properties/key"
        },
        "id": {
          "$ref": "#/$defs/commandStep/properties/key",
          "deprecated": true
        },
        "image": {
          "$ref": "#/$defs/image"
        },
        "label": {
          "$ref": "#/$defs/label"
        },
        "signature": {
          "type": "object",
          "description": "The signature of the command step, generally injected by agents at pipeline upload",
          "properties": {
            "algorithm": {
              "type": "string",
              "description": "The algorithm used to generate the signature",
              "examples": [
                "HS512",
                "EdDSA",
                "PS256"
              ]
            },
            "value": {
              "type": "string",
              "description": "The signature value, a JWS compact signature with a detached body"
            },
            "signed_fields": {
              "type": "array",
              "description": "The fields that were signed to form the signature value",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "command",
                  "matrix",
                  "plugins",
                  "env::SOME_ENV_VAR"
                ]
              ]
            }
          }
        },
        "matrix": {
          "$ref": "#/$defs/matrix"
        },
        "name": {
          "$ref": "#/$defs/commandStep/properties/label"
        },
        "notify": {
          "$ref": "#/$defs/commandStepNotify"
        },
        "parallelism": {
          "type": "integer",
          "description": "The number of parallel jobs that will be created based on this step",
          "examples": [
            42
          ]
        },
        "plugins": {
          "$ref": "#/$defs/plugins"
        },
        "soft_fail": {
          "$ref": "#/$defs/softFail"
        },
        "retry": {
          "type": "object",
          "description": "The conditions for retrying this step.",
          "properties": {
            "automatic": {
              "$ref": "#/$defs/commandStepAutomaticRetry"
            },
            "manual": {
              "$ref": "#/$defs/commandStepManualRetry"
            }
          },
          "additionalProperties": false
        },
        "skip": {
          "$ref": "#/$defs/skip"
        },
        "timeout_in_minutes": {
          "type": "integer",
          "description": "The number of minutes to time out a job",
          "minimum": 1,
          "examples": [
            60
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "script",
            "command",
            "commands"
          ]
        },
        "priority": {
          "$ref": "#/$defs/priority"
        },
        "secrets": {
          "$ref": "#/$defs/secrets"
        }
      },
      "additionalProperties": false
    },
    "nestedCommandStep": {
      "type": "object",
      "properties": {
        "command": {
          "$ref": "#/$defs/commandStep"
        },
        "commands": {
          "$ref": "#/$defs/commandStep"
        },
        "script": {
          "$ref": "#/$defs/commandStep"
        }
      },
      "additionalProperties": false
    },
    "stringWaitStep": {
      "type": "string",
      "description": "Waits for previous steps to pass before continuing",
      "enum": [
        "wait",
        "waiter"
      ]
    },
    "waitStep": {
      "type": "object",
      "properties": {
        "allow_dependency_failure": {
          "$ref": "#/$defs/allowDependencyFailure"
        },
        "branches": {
          "$ref": "#/$defs/branches"
        },
        "continue_on_failure": {
          "description": "Continue to the next steps, even if the previous group of steps fail",
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "default": false
        },
        "depends_on": {
          "$ref": "#/$defs/dependsOn"
        },
        "if": {
          "$ref": "#/$defs/if"
        },
        "key": {
          "$ref": "#/$defs/key"
        },
        "label": {
          "$ref": "#/$defs/waitStep/properties/wait"
        },
        "name": {
          "$ref": "#/$defs/waitStep/properties/wait"
        },
        "identifier": {
          "$ref": "#/$defs/waitStep/properties/key"
        },
        "id": {
          "$ref": "#/$defs/waitStep/properties/key",
          "deprecated": true
        },
        "type": {
          "type": "string",
          "enum": [
            "wait",
            "waiter"
          ]
        },
        "wait": {
          "description": "Waits for previous steps to pass before continuing",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "nestedWaitStep": {
      "type": "object",
      "properties": {
        "wait": {
          "description": "Waits for previous steps to pass before continuing",
          "$ref": "#/$defs/waitStep"
        },
        "waiter": {
          "$ref": "#/$defs/waitStep"
        }
      },
      "additionalProperties": false
    },
    "triggerStep": {
      "type": "object",
      "properties": {
        "allow_dependency_failure": {
          "$ref": "#/$defs/allowDependencyFailure"
        },
        "async": {
          "enum": [
            true,
            false,
            "true",
            "false"
          ],
          "default": false,
          "description": "Whether to continue the build without waiting for the triggered step to complete"
        },
        "branches": {
          "$ref": "#/$defs/branches"
        },
        "build": {
          "type": "object",
          "description": "Properties of the build that will be created when the step is triggered",
          "properties": {
            "branch": {
              "type": "string",
              "description": "The branch for the build",
              "default": "master",
              "examples": [
                "master",
                "feature/xyz"
              ]
            },
            "commit": {
              "type": "string",
              "description": "The commit hash for the build",
              "default": "HEAD",
              "examples": [
                "HEAD",
                "b5fb108"
              ]
            },
            "env": {
              "$ref": "#/$defs/env"
            },
            "message": {
              "type": "string",
              "description": "The message for the build (supports emoji)",
              "default": "The label of the trigger step",
              "examples": [
                "Deployment 123 :rocket:"
              ]
            },
            "meta_data": {
              "type": "object",
              "description": "Meta-data for the build",
              "examples": [
                {
                  "server": "i-b244e37160c"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "depends_on": {
          "$ref": "#/$defs/dependsOn"
        },
        "if": {
          "$ref": "#/$defs/if"
        },
        "if_changed": {
          "$ref": "#/$defs/ifChanged"
        },
        "key": {
          "$ref": "#/$defs/key"
        },
        "identifier": {
          "$ref": "#/$defs/triggerStep/properties/key"
        },
        "id": {
          "$ref": "#/$defs/triggerStep/properties/key",
          "deprecated": true
        },
        "label": {
          "$ref": "#/$defs/label"
        },
        "name": {
          "$ref": "#/$defs/triggerStep/properties/label"
        },
        "type": {
          "type": "string",
          "enum": [
            "trigger"
          ]
        },
        "trigger": {
          "type": "string",
          "description": "The slug of the pipeline to create a build"
        },
        "skip": {
          "$ref": "#/$defs/skip"
        },
        "soft_fail": {
          "$ref": "#/$defs/softFail"
        }
      },
      "required": [
        "trigger"
      ],
      "additionalProperties": false
    },
    "nestedTriggerStep": {
      "type": "object",
      "properties": {
        "trigger": {
          "$ref": "#/$defs/triggerStep"
        }
      },
      "additionalProperties": false
    },
    "groupSteps": {
      "type": "array",
      "description": "A list of steps",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/blockStep"
          },
          {
            "$ref": "#/$defs/nestedBlockStep"
          },
          {
            "$ref": "#/$defs/stringBlockStep"
          },
          {
            "$ref": "#/$defs/inputStep"
          },
          {
            "$ref": "#/$defs/nestedInputStep"
          },
          {
            "$ref": "#/$defs/stringInputStep"
          },
          {
            "$ref": "#/$defs/commandStep"
          },
          {
            "$ref": "#/$defs/nestedCommandStep"
          },
          {
            "$ref": "#/$defs/waitStep"
          },
          {
            "$ref": "#/$defs/nestedWaitStep"
          },
          {
            "$ref": "#/$defs/stringWaitStep"
          },
          {
            "$ref": "#/$defs/triggerStep"
          },
          {
            "$ref": "#/$defs/nestedTriggerStep"
          }
        ]
      },
      "minItems": 1
    },
    "groupStep": {
      "type": "object",
      "properties": {
        "depends_on": {
          "$ref": "#/$defs/dependsOn"
        },
        "group": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name to give to this group of steps",
          "examples": [
            "Tests"
          ]
        },
        "if": {
          "$ref": "#/$defs/if"
        },
        "if_changed": {
          "$ref": "#/$defs/ifChanged"
        },
        "key": {
          "$ref": "#/$defs/key"
        },
        "identifier": {
          "$ref": "#/$defs/groupStep/properties/key"
        },
        "id": {
          "$ref": "#/$defs/groupStep/properties/key",
          "deprecated": true
        },
        "label": {
          "$ref": "#/$defs/groupStep/properties/group"
        },
        "name": {
          "$ref": "#/$defs/groupStep/properties/group"
        },
        "allow_dependency_failure": {
          "$ref": "#/$defs/allowDependencyFailure"
        },
        "notify": {
          "$ref": "#/$defs/buildNotify"
        },
        "skip": {
          "$ref": "#/$defs/skip"
        },
        "steps": {
          "$ref": "#/$defs/groupSteps"
        }
      },
      "required": [
        "group",
        "steps"
      ],
      "additionalProperties": false
    },
    "pipelineSteps": {
      "description": "A list of steps",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/blockStep"
          },
          {
            "$ref": "#/$defs/nestedBlockStep"
          },
          {
            "$ref": "#/$defs/stringBlockStep"
          },
          {
            "$ref": "#/$defs/inputStep"
          },
          {
            "$ref": "#/$defs/nestedInputStep"
          },
          {
            "$ref": "#/$defs/stringInputStep"
          },
          {
            "$ref": "#/$defs/commandStep"
          },
          {
            "$ref": "#/$defs/nestedCommandStep"
          },
          {
            "$ref": "#/$defs/waitStep"
          },
          {
            "$ref": "#/$defs/nestedWaitStep"
          },
          {
            "$ref": "#/$defs/stringWaitStep"
          },
          {
            "$ref": "#/$defs/triggerStep"
          },
          {
            "$ref": "#/$defs/nestedTriggerStep"
          },
          {
            "$ref": "#/$defs/groupStep"
          }
        ]
      }
    },
    "priority": {
      "type": "integer",
      "description": "Priority of all jobs in the pipeline, higher priorities are assigned to agents. When set pipeline-wide, it applies to all steps that do not have their own priority key set.",
      "examples": [
        -1,
        0,
        10
      ]
    }
  },
  "fileMatch": [
    "buildkite.yml",
    "buildkite.yaml",
    "buildkite.json",
    "buildkite.*.yml",
    "buildkite.*.yaml",
    "buildkite.*.json",
    ".buildkite/pipeline.yml",
    ".buildkite/pipeline.yaml",
    ".buildkite/pipeline.json",
    ".buildkite/pipeline.*.yml",
    ".buildkite/pipeline.*.yaml",
    ".buildkite/pipeline.*.json"
  ]
}
