Support multi-dir wildcards in .dockerignore#17090
Conversation
97939f2 to
ffdabb8
Compare
|
Tests are failing :/ |
f90b822 to
192d307
Compare
|
windows failure is real so please don't merge yet.... need debugging help from @jhowardmsft |
eb176c5 to
8990eb9
Compare
|
@jhowardmsft I think I got it working but I don't have a lot of confidence that its very stable. Please look over the escaping bits to see if any of it makes sense. |
|
I'm +1 for this to align with gitignore. |
|
I'm 😻 for it too 😉 |
|
https://git-scm.com/docs/gitignore |
afaf2dd to
85e6386
Compare
|
While its not quite the exact same as .gitignore, its pretty close. Please take a look when you get a chance. |
|
would be cool if we could test this against the tests in git itself, e.g. https://github.com/git/git/blob/8d530c4d64ffcc853889f7b385f554d53db375ed/t/t0008-ignores.sh |
|
@thaJeztah its not 100% compatible with git's stuff so I wouldn't be surprised if it failed. This is mainly because I believe git's logic takes into account whether we're talking about a file or a dir, and we don't have that information at this spot in the code. We might be able to redesign things so that we do, but that's a much bigger change since it leaves the boundaries of the Match() function and would impact things like the tar/archive logic. I can explore that option if people want.... |
|
@duglin nah, it's cool. Any change that makes |
|
Repeating myself but looks good, and the tests too 😻. Agree with @thaJeztah too, so : |
85e6386 to
90f3d6d
Compare
|
ok - added more integration tests so once Janky does its stuff we should be good to go. |
77976e0 to
dd4983f
Compare
dd4983f to
7324b51
Compare
|
Failures on exp. & userns are unrelated. |
|
I suppose you meant @vdemeester instead of me. |
|
@vincentbernat LOL oops, sorry. yes @vdemeester |
|
I'll take the |
pkg/fileutils/fileutils.go
Outdated
There was a problem hiding this comment.
LOL yes and no. I left it there because I kept having to uncomment it as I was testing windows.
If all reviews are ok then I'll remove this.
|
LGTM apart from suspicious comment |
Closes moby#13113 Signed-off-by: Doug Davis <dug@us.ibm.com>
7324b51 to
eddb14a
Compare
|
remove extra comment - per @LK4D4's comment |
Support multi-dir wildcards in .dockerignore
Closes #13113
This adds support for wildcarding multiple levels of dirs in .dockerignore files.
**(or**/) means zero or more dirs.So
**/*.gowill exclude all go files from the build context.Signed-off-by: Doug Davis dug@us.ibm.com