Ignore .containerignore for git repositories in ADD#6800
Ignore .containerignore for git repositories in ADD#6800simonbrauner wants to merge 1 commit intocontainers:mainfrom
Conversation
ac2f35b to
9ae4022
Compare
|
Ephemeral COPR build failed. @containers/packit-build please check. |
1 similar comment
|
Ephemeral COPR build failed. @containers/packit-build please check. |
Honny1
left a comment
There was a problem hiding this comment.
LGTM, once @TomSweeneyRedHat 's comment is addressed.
9ae4022 to
3088770
Compare
nalind
left a comment
There was a problem hiding this comment.
The stageExecutor.performCopy() method sets the "Excludes" field in the options and passes the list of sources to the Add() method. Can't it base the "Excludes" value it passes in on whether or not a source value it's also passing in is a git location?
If need be, the sourceIsGit() helper function could be moved from add.go to an internal package so that performCopy() could call it. There's a check early on in define.TempDirForURL() that could probably stand to use it, too.
| mkdir -p $contextdir | ||
| cat > $contextdir/Dockerfile << _EOF | ||
| FROM busybox | ||
| ADD http://0.0.0.0:${HTTP_SERVER_PORT}/git/podman.git#v5.0.0 /podman-tag |
There was a problem hiding this comment.
Could the test -f that's being done below be done as a RUN instruction during the build?
There was a problem hiding this comment.
Yes, it could, and it is simpler that way. Fixed.
Fixes: containers#6614 Signed-off-by: Šimon Brauner <sbrauner@redhat.com>
3088770 to
b98e5cb
Compare
|
@nalind thanks for the review
Can you elaborate on this? If I understand this correctly, the idea is to Because with my understanding: The Unless:
|
That's what we more or less already do when heredocs are also in the mix, so that wouldn't be a new problem. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Fixes: #6614
Special notes for your reviewer:
Does this PR introduce a user-facing change?