A Buildkite plugin for customizing repository checkouts in your pipeline. This plugin allows you to:
- Skip the default repository checkout
- Check out multiple repositories
- Configure custom checkout paths
- 🚫 Skip default checkout
- 📁 Custom checkout paths
- 🔑 SSH key support
- 📦 Multiple repository support
steps:
- label: "Skip checkout"
command: 'echo "Skipping checkout"'
plugins:
- custom-checkout#v1.4.0:
skip_checkout: truesteps:
- label: "Custom repository checkout"
command: "buildkite-agent pipeline upload"
plugins:
- custom-checkout#v1.4.0:
skip_checkout: true
repos:
- url: "https://github.com/org/repo.git"
ref: "main"| Option | Required | Default | Description |
|---|---|---|---|
skip_checkout |
false | false |
Skip the default repository checkout |
repos |
false | [] |
List of repositories to check out |
delete_checkout |
false | false |
Delete checkout directory after build |
checkout_path |
false | $BUILDKITE_BUILD_CHECKOUT_PATH |
Custom checkout path |
Each repository in the repos list can have the following options:
| Option | Required | Default | Description |
|---|---|---|---|
url |
true | Repository Git URL | |
mirror_url |
false | Optional mirror URL for faster/local clone | |
ref |
false | Branch, tag, or commit to checkout | |
clone_flags |
false | ["-v"] |
Additional flags for git clone |
checkout_path |
false | Custom directory path for this repository |
steps:
- label: "Skip checkout"
command: 'echo "Skipping checkout"'
plugins:
- custom-checkout#v1.4.0:
skip_checkout: truesteps:
- label: "Custom checkout"
command: "buildkite-agent pipeline upload"
plugins:
- custom-checkout#v1.4.0:
skip_checkout: true
repos:
- url: "https://github.com/org/repo.git"steps:
- label: "Multiple repos"
command: "./script.sh"
plugins:
- custom-checkout#v1.4.0:
skip_checkout: true
repos:
- url: "https://github.com/org/repo1.git"
ref: "main"
- url: "https://github.com/org/repo2.git"
ref: "dev"steps:
- label: "Custom paths"
command: "./script.sh"
plugins:
- custom-checkout#v1.4.0:
skip_checkout: true
repos:
- url: "https://github.com/org/repo1.git"
ref: "main"
checkout_path: "/tmp/repo1"
- url: "https://github.com/org/repo2.git"
ref: "dev"
checkout_path: "repo2"steps:
- label: "Checkout with mirror"
command: "buildkite-agent pipeline upload"
plugins:
- custom-checkout#v1.4.0:
skip_checkout: true
repos:
- url: "https://github.com/org/repo.git"
mirror_url: "https://git-mirror.local/org/repo.git"
ref: "main"| Elastic Stack | Agent Stack K8s | Hosted (Mac) | Hosted (Linux) | Notes |
|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | n/a |
- ✅ Fully supported (all combinations of attributes have been tested to pass)
⚠️ Partially supported (some combinations cause errors/issues)- ❌ Not supported
docker-compose run --rm tests- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
The package is available as open source under the terms of the MIT License.