CrazyMax
23c2498dee
bake: display read definition files in build output
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-23 16:26:18 +02:00
CrazyMax
fd251d2a7b
builder: use variadic options in LoadNodes func
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-17 00:45:50 +02:00
CrazyMax
6c77b76b7b
Merge pull request #2038 from crazy-max/localstate-group
...
build: support local state group
2023-09-30 06:01:14 +02:00
CrazyMax
3dcb03452c
build: support local state group
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:08:06 +02:00
Justin Chadwell
e2ebab5f26
vendor: update buildkit to master@cbfd4023383d
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-09-27 11:06:18 +01:00
Justin Chadwell
f5f00e68ef
bake(cli): allow passing in-stream using command.Cli
...
ReadLocalFiles should allow passing the stdin file as an argument, which
allows us to read from dockerCli.Stdin() to be consistent with other
commands in the same package.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-09 10:50:53 +01:00
CrazyMax
0a2f35970c
build: display build details link
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-06 18:54:31 +02:00
Justin Chadwell
e61a1da7fc
Merge pull request #1748 from dvdksn/docs/bake-reference
...
docs: move and rewrite bake reference
2023-05-11 13:00:21 +01:00
David Karlsson
f8483d7243
docs: refactor bake file reference
...
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-05-11 12:54:08 +01:00
CrazyMax
621b07c799
Merge pull request #1727 from crazy-max/cmd-completion
...
cli: add shell completion
2023-05-09 10:59:32 +02:00
Justin Chadwell
16d5b38f2b
debug: display build warnings after each build
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-24 09:58:02 +01:00
CrazyMax
af011d6ca3
bake: add completion to list targets
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-11 11:34:40 +02:00
Kohei Tokunaga
8ba8659496
controller: Extract nested CommonOptions on controller API
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-03 21:35:04 +09:00
Justin Chadwell
87a120e8e3
bake: use build.IsRemoteURL
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-03 10:48:31 +01:00
Justin Chadwell
780531425b
bake: move SOURCE_DATE_EPOCH parsing to overrides
...
Previously, when directly modifying the args map when reading targets,
we could end up in a scenario where bake tests that compare arg maps
would fail if SOURCE_DATE_EPOCH was set in the environment.
This patch prevents this failure by setting the SOURCE_DATE_EPOCH at the
command level (which isn't injected into tests as well), ensuring that
we test correctly even when SOURCE_DATE_EPOCH is set in the environment.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-03-15 10:06:53 +00:00
Justin Chadwell
c2e11196dd
controller: handle attestation options across api
...
We can perform all attestation processing, handling how the sbom and
provenance arguments interact on the client, while applying defaults on
the server.
Additionally, this allows us to start pulling fields out of CommonOpts.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-02-23 15:46:37 +00:00
CrazyMax
598f1f0a62
build: print instance being used
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-16 14:56:46 +01:00
Justin Chadwell
a9fd128910
controller: move controllers out of commands into separate package
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-31 17:51:33 +00:00
Kohei Tokunaga
a27b8395b1
Enable to run build and invoke in background
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-01-26 17:17:07 +09:00
CrazyMax
8c47277141
store: set nodegroup last activity
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-08 19:49:51 +01:00
Justin Chadwell
25aa893bad
bake: add attests field
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 18:44:21 +00:00
CrazyMax
e7b5ee7518
mutualize builder logic
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-06 12:13:41 +01:00
CrazyMax
63073b65c0
dockerutil pkg to manage docker api client and context
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-06 12:13:41 +01:00
CrazyMax
e66410b932
Merge pull request #1313 from jedevc/bake-group-recurse
...
bake: recursively resolve groups
2022-11-25 11:27:09 +01:00
David Karlsson
be3b41acc6
docs: refactored file and directory structure
...
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2022-11-04 19:57:50 +01:00
Justin Chadwell
a50e89c38e
progress: explicitly fail if tty requested but not available
...
The NewPrinter function is mostly borrowed from buildkit. However, at
some point, it seems that the implementations drifted.
This patch updates buildx to be more similar in behavior to it's
buildkit counterpart, specifically, it will explicitly fail if a TTY
output is requested using "--progress=tty", but the output is not
available.
To gracefully fallback to plain progress in this scenario,
"--progress=plain" is required.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-10-25 10:55:36 +01:00
CrazyMax
c53b0b8a12
bake: do not fail printing definition if instance unavailable
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-04 15:38:45 +02:00
Justin Chadwell
77b33260f8
bake: recursively resolve groups
...
Groups that contained other groups were not recursively resolved by
ReadTargets, which prevented output from --print from being useable as a
self-contained bake file.
This patch ensures that all groups that are referenced inside the bake
file are actually defined under the groups field. This has required a
substantial refactor, as previously only a single group was returned
from ReadTargets, notably, returning a map of groups, instead of a
slice.
This does introduce a small behavior change to the behavior of --print -
while previously, passing a group name to bake would return all the
targets of that group back as the default group, now only the name of
that group will be inserted into the default group, keeping the original
group intact. The impact of this can be observed in some of the changes
to the bake_test.go file.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-09-12 13:51:34 +01:00
CrazyMax
7ef679d945
bake(compose): allow dot in target name
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-31 16:53:44 +02:00
Tonis Tiigi
c255c04eed
bake: restore consistent output for metadata
...
Metadata formatting should not depend on the number
of targets.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-03-08 10:06:03 -08:00
Tonis Tiigi
b5bf28d722
bake: use better error in named contexts not supported
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-22 21:56:52 -08:00
CrazyMax
299fd19c49
build: enhance metadata json output
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-11 08:16:42 +01:00
Edgar Lee
2d7540fb0a
Separate io.Writer from console.File for NewPrinter
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2022-02-06 09:11:47 -08:00
CrazyMax
316ca972b6
bake: fix print output
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-24 21:54:57 +01:00
CrazyMax
a0a7db127c
cli: fix flags usage
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-22 10:51:59 +01:00
Tonis Tiigi
88d0775692
refactor accessing registry configs via drivers
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-04 10:01:23 -07:00
Tonis Tiigi
aa52a5a699
build: set local sharedkey per project basename
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-10-29 21:29:04 -07:00
CrazyMax
36a37a624e
refactor: flags lexical order
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-26 13:11:28 +02:00
CrazyMax
9e62c9f074
Fix --driver flag usage markdown output
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-29 15:33:44 +02:00
Tonis Tiigi
6fc906532b
bake: fix using push override with output definition
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-20 16:22:27 -07:00
CrazyMax
55a3ce606f
Built-in variable BAKE_LOCAL_PLATFORM
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-02 23:06:05 +02:00
CrazyMax
c685e46609
bake: print default group
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-08-12 09:02:36 +02:00
Tonis Tiigi
1bb425a882
bake: allow BAKE_CMD_CONTEXT builtin var
...
Allows accessing the main context for bake command from bake
file that has been imported remotely.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-12 21:01:41 -07:00
Tonis Tiigi
9d88450118
enable opentelemetry support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-12 13:42:52 -07:00
CrazyMax
1253020b3d
Add metadata-file flag
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-06-30 07:41:26 +02:00
Tonis Tiigi
cffcd57edb
bake: support for remote files
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-07 22:02:51 -08:00
Ilya Dmitrichenko
40b41ac6e4
bake: ensure --builder
is wired from root options
...
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2020-07-08 12:03:15 +01:00
Tonis Tiigi
18095ee87b
bake: reset no-cache and pull if not set
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-30 13:01:45 -07:00
Tibor Vass
c4d07f67e3
commands: check if flag is set instead of using flagutil.Tristate
...
Fixes --pull and --no-cache without argument
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-30 12:25:41 -07:00
Patrick Van Stee
4121ae50b5
Modify parsing functions and config structs to accept hcl changes
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:51:26 -04:00