-
Bug
-
Resolution: Unresolved
-
Normal
-
builds-1.2
Description of problem:
When we do not use "spec.source.git.revision" , it automatically does a shallow git clone which is same behaviour with buildconfig. But when we specify "spec.source.git.revision", it does a full git clone.
Workaround: None
Prerequisites (if any, like setup, operators/versions):
- Builds for OpenShift 1.3
Steps to Reproduce
- Create a `Build` as follows:
- Use the `buildah` strategy to create a build with a Dockerfile at the source root.
- In the source for the build, use a Dockerfile that prints the size of the .git directory:
FROM registry.access.redhat.com/ubi9/ubi:latest RUN mkdir -p /opt/app-root WORKDIR /opt/app-root COPY . . RUN ls -al .git
- Ensure the build source from git using a specific revision. This could be a branch, tag, or commit sha.
- Start a `BuildRun` from said build, using the `shp` command line (`shp build run ...`)
Actual results:
Git source contains the full history
Expected results:
Git has a shallow clone, which does not contain the full history.
Reproducibility (Always/Intermittent/Only Once):
Always
Acceptance criteria:
Cloning with our without the revision specified produces the same behavior - shallow clone by default.
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):
- is blocked by
-
RHEL-111334 Feature Request: Upgrade git to v2.49 or higher
-
- New
-
- is related to
-
BUILD-1299 Investigate whether shallow clone can be implemented in Openshift Builds
-
- Closed
-
- links to