Skip to content

Parse source commit and branch in preflight builds#781

Open
mcncl wants to merge 3 commits intomainfrom
TE-5517/add_source_branch
Open

Parse source commit and branch in preflight builds#781
mcncl wants to merge 3 commits intomainfrom
TE-5517/add_source_branch

Conversation

@mcncl
Copy link
Copy Markdown
Contributor

@mcncl mcncl commented Apr 13, 2026

Description

Supports the passing of BUILDKITE_PREFLIGHT_SOURCE_COMMIT to preflight builds, as well as BUILDKITE_PREFLIGHT_SOURCE_BRANCH when not in a detached HEAD state.

Changes

  • Resolves the git context from the original state that a preflight build was created from
  • Expands the build env to always include BUILDKITE_PREFLIGHT_SOURCE_COMMIT in preflight builds
  • When not in detached HEAD, we will also set BUILDKITE_PREFLIGHT_SOURCE_BRANCH, where the source branch can be resolved

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

@mcncl mcncl requested review from a team as code owners April 13, 2026 05:02
Co-authored-by: Matthew Borden <matthewborden@users.noreply.github.com>
@mcncl mcncl force-pushed the TE-5517/add_source_branch branch from e1e8f9a to 8feef76 Compare April 14, 2026 10:18
@mcncl mcncl requested a review from matthewborden April 14, 2026 10:19
Co-authored-by: Matthew Borden <matthewborden@users.noreply.github.com>
@mcncl mcncl force-pushed the TE-5517/add_source_branch branch from 8feef76 to cd01d95 Compare April 14, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants