Built-in git checkout may cover this use case
Buildkite now supports checkout customization directly in pipeline YAML, including skip checkout, shallow clones, sparse checkout, custom Git flags, SSH checkout secrets, and commit verification. For most checkout use cases, try the built-in configuration before adding this plugin. View git checkout configuration .
Git Checkout Flags Buildkite Plugin
A minimal Buildkite plugin that allows you to control git clone, fetch, and clean flags during checkout.
Example
Using a preset:
steps:
- command: make test
plugins:
- envato/git-checkout-flags#v1.1.0:
preset: shallow
Using custom flags:
steps:
- command: make test
plugins:
- envato/git-checkout-flags#v1.1.0:
clone: "<clone-flags>"
fetch: "<fetch-flags>"
Configuration
preset (optional, string)
Use a predefined set of flags. Available presets:
shallow: Optimized for fast, shallow clones with minimal historyunshallow: Detects shallow repositories (from a previous job) and fetches full history
Explicit clone, fetch, or clean options will override preset values.
clone (optional, string)
Flags to pass to git clone. Sets BUILDKITE_GIT_CLONE_FLAGS.
fetch (optional, string)
Flags to pass to git fetch. Sets BUILDKITE_GIT_FETCH_FLAGS.
clean (optional, string)
Flags to pass to git clean. Sets BUILDKITE_GIT_CLEAN_FLAGS.
Developing
To run the tests:
make test
To run linting:
make lint
License
MIT (see LICENSE)