buildkite / buildkite/agent

allow custom git clone flags during a plugin checkout

Open
#1,839 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.1k
Forks
378
Avg merge
2d 6h
Merged PRs (30d)
74

Description

**Is your feature request related to a problem? Please describe.**
In all our jobs, the first thing to be executed is the "Preparing plugins" section which clones the git repos of plugins that we use for that step.

But the git clone of a plugin repo is adding a lot of log lines (to report the progress of the clone) which often adds noise to our build logs. We would ideally like to suppress these logs by doing a `git clone --quiet` instead.

**Describe the solution you'd like**
I would like to add a new config to the agent - something like `plguins-git-clone-flags` (`BUILDKITE_PLUGINS_GIT_CLONE_FLAGS`) and make use of that config while cloning the plugin repo here:
https://github.com/buildkite/agent/blob/79a7ba7c5045ea30ce009ba80d6eed47fe578ed1/bootstrap/bootstrap.go#L899-L916

**Describe alternatives you've considered**
None

**Additional context**
This is how our build logs look when the plugin is cloned for the first time. (a sample of first few lines, but imagine 500+ more lines like this)
![image](https://user-images.githubusercontent.com/4211715/202627821-f686d458-80b7-4ad0-86ed-53f0c5de965c.png)

Having this config option would help is in avoiding these lines in our build logs.

Contributor guide

Open the contributing guide

Research direction

Start in bootstrap/bootstrap.go at the plugin checkout code around lines 899–916 and trace how agent configuration is read and passed to the git clone command. Check the existing bootstrap tests or configuration handling nearby before implementing the requested plugin clone flags. Done means the configured flags are applied during plugin checkout, including suppressing clone progress when requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.