commit 1727e353f289c0c2f47090fcc14d340c7e5e8837
parent 06c9e1d6039de1d2485c4f9051396a62d11c9397
Author: Andrew Halberstadt <ahal@mozilla.com>
Date: Fri, 31 Oct 2025 13:32:02 +0000
Bug 1996593 - [ci] Use shallow clones by default for Git based tasks, r=taskgraph-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D270345
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/taskcluster/gecko_taskgraph/transforms/job/run_task.py b/taskcluster/gecko_taskgraph/transforms/job/run_task.py
@@ -36,6 +36,8 @@ run_task_schema = Schema(
Required("sparse-profile"): Any(str, None),
# The relative path to the sparse profile.
Optional("sparse-profile-prefix"): str,
+ # Whether to use a shallow clone or not, default True (git only).
+ Optional("shallow-clone"): bool,
# if true, perform a checkout of a comm-central based branch inside the
# gecko checkout
Required("comm-checkout"): bool,
@@ -74,6 +76,8 @@ def common_setup(config, job, taskdesc, command):
gecko_path = support_vcs_checkout(config, job, taskdesc, repo_configs)
command.append(f"--gecko-checkout={gecko_path}")
+ if config.params["repository_type"] == "git" and run.get("shallow-clone", True):
+ command.append("--gecko-shallow-clone")
if run_cwd:
run_cwd = path.normpath(run_cwd.format(checkout=gecko_path))