-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Load GitHub runtime environment when using buildctl #2707
Load GitHub runtime environment when using buildctl #2707
Conversation
65342ab
to
d622a11
Compare
We could also just add support for this in |
I agree, if you leave me time, I can take care of it. How that should be handle when used with |
It should be done in buildctl pkg not in the client
|
Okay! Then I have a question : if someone directly the client, will it works? Or it's the responsibility of the user to inject values? |
If you use client pkg directly then this should be taken care by the caller. Client is not a singleton and should not be taking inputs from the running environment. |
f29ac5b
to
4c4188e
Compare
@tonistiigi I updated the PR to supports GitHub runtime environment with |
@TomChv check the CI |
cmd/buildctl/build/exportcache.go
Outdated
@@ -39,6 +39,9 @@ func parseExportCacheCSV(s string) (client.CacheOptionsEntry, error) { | |||
if _, ok := ex.Attrs["mode"]; !ok { | |||
ex.Attrs["mode"] = "min" | |||
} | |||
if ex.Type == "gha" { | |||
return bindGithubCacheAttributes(ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loadGithubEnv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 6ac606c
4c4188e
to
c9f4124
Compare
My bad, I forget the push the most important haha. |
Looks like I'm waiting for your response before doing any changes @tonistiigi |
Looks like the go version for windows was not updated. https://github.com/moby/buildkit/blob/master/.github/workflows/build.yml#L143 That's the only part of CI that is not in containers. Just update it to 1.17 . Do this in a separate commit (or PR). |
cmd/buildctl/build/util.go
Outdated
package build | ||
|
||
import ( | ||
"errors" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 6ac606c
Done in #2719, gonna rebase after getting that one merged |
6ac606c
to
2f68ff4
Compare
@tonistiigi Looks like it's ready to be merged :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but squash your commits as atm your second commit reverts the first one.
Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
2f68ff4
to
8d823f8
Compare
Done, it's ready to be merged 🚀 |
It seems this hasn't yet made it into a release? |
When using
buildctl
, it's not explained in the documentation that GitHub attributesurl
andtoken
must be manually set to make this works.That miscomprehension is visible with #2706.
To do not meet that error again, this commit add a precision on how use GitHub cache with buildctl.
Signed-off-by: Vasek - Tom C tom.chauveau@epitech.eu