From 344658db76975444a5a4a639124116dbe7975e6c Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Tue, 15 Oct 2024 23:45:21 -0700 Subject: [PATCH] CI: gitlab: increase git clone depth to 100 (MR 5718) Technically this option can be configured in the Gitlab UI, but I spent about 3 hours debugging a CI failure caused by it being too low and I don't want to risk forgetting this can happen later if/when someone decides to lower it in the UI. By setting it here, we can have some context/history about why. This fixes the CI in !5688 Also see: https://docs.gitlab.com/17.4/ee/user/project/repository/monorepos/index.html#shallow-cloning [ci:skip-build]: already built successfully in CI --- .gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7d1093b9..0701524ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,12 @@ stages: - lint - build - autoupdate - +variables: + # Default of 20 is pretty small, sometimes MRs have >20 commits in them. 100 + # seems like a reasonable balance. If this is too low, git merge-base (from ci/ + # common.py) can fail + GIT_DEPTH: 100 + # This defines the rules for when a pipeline should run. workflow: rules: