add support of --builder and BUILDX_BUILDER#10745
Conversation
| cmd.Flags().StringVar(&opts.ssh, "ssh", "", "Set SSH authentications used when building service images. (use 'default' for using your default SSH Agent)") | ||
| cmd.Flags().StringVar(&opts.builder, "builder", "", "Set builder to use.") | ||
| cmd.Flags().Bool("parallel", true, "Build images in parallel. DEPRECATED") | ||
| cmd.Flags().MarkHidden("parallel") //nolint:errcheck |
There was a problem hiding this comment.
Very unrelated, but if this flag is deprecated, should this use MarkDeprecated()? (are we still using the value anywhere?)
There was a problem hiding this comment.
I'll do a dedicated PR for this one 👍
There was a problem hiding this comment.
Yes! Definitely not in this PR (my eye just dropped on it .. well.. as always 😂)
12cf2f4 to
bcc1974
Compare
ndeloof
left a comment
There was a problem hiding this comment.
LGTM but shall we also introduce a builder attribute in the compose specification?
Would that be very useful? If we'd add such an option, I think it'd make more sense to describe the properties of the builder instead of the name of the builder. Currently it's somewhat similar to Perhaps we need to resurrect some of the concepts from |
|
It would indeed be nice there's some way to describe a builder so that we can inspect the available ones and select a good match, but afaik we only can rely on a name. Also, I can imagine it will become quickly boring for a user to pass |
|
That's where the env var would be for? ( |
Yes, that's something to look into I guess. I'm still not sure if hard-coding it in the project's config would make sense (as it's effectively hard-coding your current environment into the project, which seems better to handle separate). |
milas
left a comment
There was a problem hiding this comment.
For consistency, it'd be nice to have the flag available on up as well, but logic LGTM!
bcc1974 to
bdd3757
Compare
I'm not sure we should add this flag to the |
bdd3757 to
f45c5cb
Compare
|
Agree advanced build options should be limited to |
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## v2 #10745 +/- ##
==========================================
+ Coverage 59.09% 59.10% +0.01%
==========================================
Files 115 115
Lines 9844 9850 +6
==========================================
+ Hits 5817 5822 +5
Misses 3436 3436
- Partials 591 592 +1
☔ View full report in Codecov by Sentry. |
f45c5cb to
28301fb
Compare
What I did
Add
--builderflag tobuildcommand and support of theBUILDX_BUILDERenv variable to support choose dedicated builder.Should address #10664 until a proposal is discussed in the Compose specification
Related issue
N/A
(not mandatory) A picture of a cute animal, if possible in relation to what you did
