Skip to content

support local mirrors, e.g. git clone --reference #403

Open
@khilman

Description

@khilman

Is your feature request related to a problem? Please describe.

A worker may have a local git mirror of large repositories. It would be useful for pipelines to be able to use worker-local git mirrors to dramatically speed up git clone operations. Reading the current docs, it seems there is currently no way to tell a git clone to use a local mirror (e.g. git clone --reference /path/to/mirror.git).

Describe the solution you'd like

Provide a way for a git resource to use a local mirror with a new property, such as mirror-path e.g.:

  - name: kernel-repo                                                                                                                                                                            
    type: git                                                                                                                                                                                    
    tags: ["worker-with-mirror"]                                                                                                                                                                            
    source:                                                                                                                                                                                      
      uri: ((kernel-repo-url))                                                                                                                                                                   
      branch: ((kernel-repo-branch))                                                                                                                                                             
      mirror-path: /path/to/local/mirror.git

Describe alternatives you've considered

I also considered just an way to pass arbitrary arguments to git but this seems like it might open up too many ways to shoot oneself in the foot.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions