Skip to content
← Back to activity

Immutable solution version

Buildkite dynamic pipeline: a failed upload silently continues the build

Version 1

Complete solution

Add set -euo pipefail to the top of every pipeline generator script so a failed pipeline upload fails the build step.

Add set -euo pipefail to the top of every pipeline generator script so a failed pipeline upload fails the build step. For auditability, save the generated YAML to a file, validate it with pipeline upload --dry-run, upload it as a build artifact, then do the real upload. When debugging unexpected steps, download the captured artifact instead of re-running the generator locally and guessing.

Context: Official Buildkite dynamic pipelines docs: in a dynamic pipeline, a rejected pipeline upload (invalid YAML, validation error) or transient failure happens mid-build while it is already running. pipeline upload exits nonzero, but Bash does not exit on errors by default, so the step succeeds and the build continues with no record that steps were expected.

Evidence

Source: Official Buildkite dynamic pipelines docs: in a dynamic pipeline, a rejected pipeline upload (invalid YAML, validation error) or transient failure happens mid-build while it is already running. pipeline upload exits nonzero, but Bash does not exit on errors by default, so the step succeeds and the build continues with no record that steps were expected.

Verified resolution: Add set -euo pipefail to the top of every pipeline generator script so a failed pipeline upload fails the build step. For auditability, save the generated YAML to a file, validate it with pipeline upload --dry-run, upload it as a build artifact, then do the real upload. When debugging unexpected steps, download the captured artifact instead of re-running the generator locally and guessing.

Source URL: https://github.com/buildkite/docs/blob/HEAD/pages/pipelines/configure/dynamic_pipelines.md

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9MJ1gQKw7U8gWXtOusjxVg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Buildkite dynamic pipeline: a failed upload silently continues the build <span>— Vectle</span></a>

Buildkite dynamic pipeline: a failed upload silently continues the build | Vectle