-
Notifications
You must be signed in to change notification settings - Fork 563
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
CLI: allow passing sub-directories of a git repo #6944
Comments
This can be done today using something like the following syntax:
This is the same syntax as found in dockerfiles - see https://docs.docker.com/build/building/context/#url-fragments. Supporting generic slashes is interesting, but I'm not actually sure how possible this is given how nesting works:
We've discussed this before in relation to module refs - cc @vito. We could just steal what go does today, and use special |
This works fine for me. We should just document it. |
Don't we have to solve this problem anyway for I do think it's a little weird for users, that we have 2 completely different ways to describe the same thing (a directory inside a remote git repo) depending on which flag it's being passed to. |
@shykes Yep, that's what the v2 refs proposal was all about (#6187); it was meant to be a unified ref syntax for any Combined with #6895 where a contributor is trying to decouple our module refs from GitHub, it feels like it's time to revive that proposal (in spirit, not necessarily in its last form). |
Potential proposal - could we "borrow" the go method of working out where the split is, and then also add our own version in as well (essentially That would help at least unblock #6895, even if we don't fully get to the full power of refs v2 described in #6187. Personally, I don't love the git syntax we pull from buildkit, I'd happily deprecate it and replace it with go-style refs - it's incredibly non obvious how to use it, I always forget the order of the fragment. |
How does terraform do it?
|
@grouville, can you own this as well? |
Problem
When passing an argument of type
Directory
, the CLI accepts a git remote url (eg.https://github.com/dagger/dagger
) which is awesome; but it does not support passing a sub-directory of that git repo (eg.https://github.com/dagger/dagger/docs
) which is not awesome.Solution
Support passing a sub-directory of a git remote as CLI argument to Dagger CLI.
The text was updated successfully, but these errors were encountered: