Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
khilman opened this issue May 16, 2023 · 1 comment
Open

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

khilman opened this issue May 16, 2023 · 1 comment

Comments

@khilman
Copy link

khilman commented May 16, 2023

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

@marco-m
Copy link

marco-m commented May 18, 2023

An alternative that should be doable with the git resource as-is is to have a git mirror, but not colocated with the worker(s), just in the same network of the workers, and point the uri to the mirror.

For example, say the original repo is at https://github.com/foo/bar and the mirror is at http://mirror.internal/foo/bar. Then you could just point the resource to the mirror...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants