Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

No way to specify clone depth when build context is a git repo #3483

@ashishmax31

Description

@ashishmax31

Since we only care about the current state of the repo, it doesn't make sense to pull the full commit history of a repo.
It would be helpful to expose a new flag to set the git clone depth - Which would then be honoured here: https://github.com/GoogleContainerTools/kaniko/blob/main/pkg/buildcontext/git.go#L62.

I'd be happy to open a PR to add this change.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions