ComplianceAsCode / auditree-framework

The Auditree framework tool to run compliance control checks as unit tests.
https://auditree.github.io/
Apache License 2.0
59 stars 23 forks source link

Support locker shallow clone depth configuration. #139

Closed smithsz closed 2 years ago

smithsz commented 2 years ago

Creates a shallow clone with a history truncated to the specified number of commits.

What

Support locker shallow clone depth configuration. For example:

"locker": {
  "depth": 10,
  "repo_url": "https://github.ibm.com/foo/evidence-collector"
}

This creates a shallow clone with a history truncated to the specified number of commits (i.e. 10 commits).

Why

Reduce clone time when pulling large repositories.

How

Clone evidence repositories using the git-clone --depth flag.

Test

Tested locally.

Context

Closes https://github.com/ComplianceAsCode/auditree-framework/issues/135.