Skip to content

Enable setting BUILDKITE_GIT_SUBMODULE with Environment Variables#3677

Open
tomowatt wants to merge 7 commits intomainfrom
enable-setting-BUILDKITE_GIT_SUBMODULE-env-vars
Open

Enable setting BUILDKITE_GIT_SUBMODULE with Environment Variables#3677
tomowatt wants to merge 7 commits intomainfrom
enable-setting-BUILDKITE_GIT_SUBMODULE-env-vars

Conversation

@tomowatt
Copy link
Member

@tomowatt tomowatt commented Jan 23, 2026

Description

Currently, BUILDKITE_GIT_SUBMODULE is only configurable via Agent config or during Agent Start, leaving options to disable cloning submodules limited to having plugins to change checkout which can be problematic. So allowing the use of the changing BUILDKITE_GIT_SUBMODULE Environment Variable at the Pipeline/Step level or via Hook, allows more flexible and removes need to seek alternative approachs.

Agents config takes precendence in the cases that no-git-submodules has already been set.

Context

SUP-6018

Changes

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

I consulted Claude on potential approaches, then wrote the implementation myself based on existing patterns.

* defaults to true for backwards compatibility

Signed-off-by: Tom Watt <tom@buildkite.com>
Signed-off-by: Tom Watt <tom@buildkite.com>
@tomowatt tomowatt marked this pull request as draft January 23, 2026 17:51
Signed-off-by: Tom Watt <tom@buildkite.com>
@tomowatt tomowatt marked this pull request as ready for review January 23, 2026 18:35
@zhming0 zhming0 requested a review from a team January 27, 2026 00:15
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.

1 participant