|
172 | 172 | "description": "Whether to cancel the job as soon as the build is marked as failing", |
173 | 173 | "default": false |
174 | 174 | }, |
| 175 | + "checkout": { |
| 176 | + "type": "object", |
| 177 | + "description": "Configure git checkout behavior. Pipeline-level values are inherited by each step unless that step overrides the same key", |
| 178 | + "properties": { |
| 179 | + "depth": { |
| 180 | + "type": ["integer", "string"], |
| 181 | + "description": "Number of commits to fetch when performing a shallow clone; omit for full history", |
| 182 | + "minimum": 1, |
| 183 | + "pattern": "^[1-9][0-9]*$", |
| 184 | + "examples": [1] |
| 185 | + }, |
| 186 | + "skip": { |
| 187 | + "enum": [true, false, "true", "false", null], |
| 188 | + "description": "Skip the git checkout phase. An explicit null is treated as unset", |
| 189 | + "default": false |
| 190 | + }, |
| 191 | + "submodules": { |
| 192 | + "enum": [true, false, "true", "false", null], |
| 193 | + "description": "Initialize, sync, update, and clean submodules recursively as part of checkout. An explicit null is treated as unset", |
| 194 | + "default": true |
| 195 | + }, |
| 196 | + "commit_verification": { |
| 197 | + "type": "string", |
| 198 | + "description": "Verify the checked-out commit is on the expected branch; strict fails the job on a definitive mismatch, warn only logs", |
| 199 | + "enum": ["strict", "warn"] |
| 200 | + }, |
| 201 | + "flags": { |
| 202 | + "type": "object", |
| 203 | + "description": "Custom flags passed to git commands during checkout. Flag strings are passed to git verbatim and are not sanitized; do not interpolate untrusted input. See the agent documentation for precedence and defaults: https://buildkite.com/docs/agent/v3/configuration", |
| 204 | + "properties": { |
| 205 | + "clone": { |
| 206 | + "type": "string", |
| 207 | + "description": "Flags for the git clone command", |
| 208 | + "default": "-v", |
| 209 | + "examples": ["--depth 1 --single-branch"] |
| 210 | + }, |
| 211 | + "fetch": { |
| 212 | + "type": "string", |
| 213 | + "description": "Flags for the git fetch command", |
| 214 | + "default": "-v --prune", |
| 215 | + "examples": ["--prune --tags"] |
| 216 | + }, |
| 217 | + "checkout": { |
| 218 | + "type": "string", |
| 219 | + "description": "Flags for the git checkout command", |
| 220 | + "default": "-f", |
| 221 | + "examples": ["-q"] |
| 222 | + }, |
| 223 | + "clean": { |
| 224 | + "type": "string", |
| 225 | + "description": "Flags for the git clean command", |
| 226 | + "default": "-ffxdq", |
| 227 | + "examples": ["-fxd"] |
| 228 | + } |
| 229 | + }, |
| 230 | + "additionalProperties": false, |
| 231 | + "examples": [ |
| 232 | + { "clone": "--depth 1 --single-branch" }, |
| 233 | + { "fetch": "--prune --tags" }, |
| 234 | + { "clone": "", "fetch": "" } |
| 235 | + ] |
| 236 | + }, |
| 237 | + "ssh_secret": { |
| 238 | + "type": "string", |
| 239 | + "description": "Name of an SSH private key secret from Buildkite Secrets to use for git clone/fetch operations. The name must start with a letter, contain only letters, numbers, and underscores, and must not start with `buildkite` or `bk` (case-insensitive).", |
| 240 | + "minLength": 1, |
| 241 | + "maxLength": 255, |
| 242 | + "pattern": "^[A-Za-z][A-Za-z0-9_]*$", |
| 243 | + "not": { |
| 244 | + "pattern": "^([Bb][Uu][Ii][Ll][Dd][Kk][Ii][Tt][Ee]|[Bb][Kk])" |
| 245 | + }, |
| 246 | + "examples": ["deploy_key", "github_readonly", "bitbucket_ssh_key"] |
| 247 | + }, |
| 248 | + "lfs": { |
| 249 | + "enum": [true, false, "true", "false", null], |
| 250 | + "description": "Whether to install Git LFS and fetch LFS objects after checkout. An explicit null is treated as unset", |
| 251 | + "default": false |
| 252 | + }, |
| 253 | + "sparse": { |
| 254 | + "type": "object", |
| 255 | + "description": "Check out only the specified paths in git cone mode; requires git 2.27+ on the agent", |
| 256 | + "properties": { |
| 257 | + "paths": { |
| 258 | + "description": "Repository-relative directory paths within the worktree, as one path or a list of paths; cone mode includes each directory recursively, not file globs", |
| 259 | + "anyOf": [ |
| 260 | + { "$ref": "#/definitions/checkoutSparsePath" }, |
| 261 | + { |
| 262 | + "type": "array", |
| 263 | + "items": { "$ref": "#/definitions/checkoutSparsePath" }, |
| 264 | + "minItems": 1, |
| 265 | + "uniqueItems": true |
| 266 | + } |
| 267 | + ], |
| 268 | + "examples": ["src/", ["src/", "docs/"]] |
| 269 | + } |
| 270 | + }, |
| 271 | + "required": ["paths"], |
| 272 | + "additionalProperties": false, |
| 273 | + "examples": [{ "paths": ["src/", "docs/"] }] |
| 274 | + } |
| 275 | + }, |
| 276 | + "additionalProperties": false |
| 277 | + }, |
| 278 | + "checkoutSparsePath": { |
| 279 | + "type": "string", |
| 280 | + "pattern": "^[^,\\t\\n\\v\\f\\r]+$", |
| 281 | + "not": { |
| 282 | + "pattern": "^[-\\t\\n\\v\\f\\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]|[\\t\\n\\v\\f\\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]$" |
| 283 | + } |
| 284 | + }, |
175 | 285 | "dependsOnList": { |
176 | 286 | "type": "array", |
177 | 287 | "items": { |
|
261 | 371 | "items": { |
262 | 372 | "description": "A Slack channel as `#channel`, `team#channel`, `@user`, `team@user`, or a Slack ID. Must not be empty or contain whitespace.", |
263 | 373 | "type": "string", |
264 | | - "pattern": "^\\S+$" |
| 374 | + "pattern": "^[^ \\t\\n\\v\\f\\r]+$" |
265 | 375 | } |
266 | 376 | }, |
267 | 377 | "message": { |
|
278 | 388 | { |
279 | 389 | "description": "A Slack channel as `#channel`, `team#channel`, `@user`, `team@user`, or a Slack ID. Must not be empty or contain whitespace.", |
280 | 390 | "type": "string", |
281 | | - "pattern": "^\\S+$" |
| 391 | + "pattern": "^[^ \\t\\n\\v\\f\\r]+$" |
282 | 392 | }, |
283 | 393 | { |
284 | 394 | "$ref": "#/definitions/notifySlackObject" |
|
1113 | 1223 | "cancel_on_build_failing": { |
1114 | 1224 | "$ref": "#/definitions/cancelOnBuildFailing" |
1115 | 1225 | }, |
| 1226 | + "checkout": { |
| 1227 | + "$ref": "#/definitions/checkout" |
| 1228 | + }, |
1116 | 1229 | "command": { |
1117 | 1230 | "$ref": "#/definitions/commandStepCommand" |
1118 | 1231 | }, |
|
1534 | 1647 | "priority": { |
1535 | 1648 | "$ref": "#/definitions/priority" |
1536 | 1649 | }, |
| 1650 | + "checkout": { |
| 1651 | + "description": "Configure git checkout behavior. Pipeline-level values are inherited by each step unless that step overrides the same key. ssh_secret is step-level only and is not valid here", |
| 1652 | + "allOf": [{ "$ref": "#/definitions/checkout" }], |
| 1653 | + "properties": { |
| 1654 | + "ssh_secret": false |
| 1655 | + } |
| 1656 | + }, |
1537 | 1657 | "steps": { |
1538 | 1658 | "$ref": "#/definitions/pipelineSteps" |
1539 | 1659 | } |
|
0 commit comments