bake: fix BAKE_CMD_CONTEXT relative path resolution#1840
Merged
jedevc merged 8 commits intodocker:masterfrom Jun 6, 2023
Merged
bake: fix BAKE_CMD_CONTEXT relative path resolution#1840jedevc merged 8 commits intodocker:masterfrom
jedevc merged 8 commits intodocker:masterfrom
Conversation
c7647f4 to
41c613d
Compare
5296eaa to
cf100e3
Compare
crazy-max
reviewed
Jun 6, 2023
Collaborator
Author
@crazy-max sure, will work on this. |
efe200a to
537a643
Compare
Signed-off-by: Justin Chadwell <[email protected]>
- Adds a new GitServeHTTP function to start an http server to serve a target git repository. - Adds a new GitDir helper method to get the path to the .git directory - Updates the GitAdd method to take a variable number of files Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Fixed in 12b6a3a, but now we have regression tests! So we can add a check that we don't break this behavior again. Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
537a643 to
d34103b
Compare
tonistiigi
approved these changes
Jun 6, 2023
Member
tonistiigi
left a comment
There was a problem hiding this comment.
Iiuc the util/gitutil serves dual purposes atm and is used for reading VCS info for builds as well as test utilities. This isn't ideal and these responsibilities should be split. Not needed in this PR though.
crazy-max
approved these changes
Jun 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠️ Fixes path resolution issue with
BAKE_CMD_CONTEXT.In https://docs.docker.com/build/bake/remote-definition/, the following snippet no longer works:
Instead returning the following error:
This issue comes from
buildx/bake/bake.go
Lines 1007 to 1010 in 341fb65
To resolve this issue, we need to ensure that the passed path is an absolute path, instead of the relative path
..To prevent further regression, I add a couple of tests to build against a remote git repo (which is where most of the code in this PR comes from 😱).
cc @crazy-max @dvdksn