BUILDKITE_GIT_CLONE_FLAGS doesn't appear passed in call to git clone

334 views Asked by At

In my pipeline.yaml I define at the top level:

env:
  BUILDKITE_AGENT_DEBUG: "true"
  BUILDKITE_CLEAN_CHECKOUT: "true"
  BUILDKITE_GIT_CLONE_FLAGS: "-q"

However when my build runs I still see the default -v passed and not my provided clone flags.

[90m# Host "github.com" already in list of known hosts at "/var/lib/buildkite-agent/.ssh/known_hosts"[0m
[90m$[0m git clone -v -- [email protected]:org/myrepo.git .
Cloning into '.'...

In the UI under the Environment tab I see BUILDKITE_GIT_CLONE_FLAGS="-q" but it doesn't appear in the logs.

1

There are 1 answers

0
Narthana Epa On

According to https://buildkite.com/docs/pipelines/environment-variables#BUILDKITE_GIT_CLONE_FLAGS, this is an agent configuration option. So, one way to set it is in the agent's configuration file, which needs to happen before the agents start up.

It's most likely that setting it in a pipeline.yaml will be ignored, especially if the pipeline.yaml is in the git repository that the pipeline is for.