buildx/bake
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
..
hclparser bake: add timestamp function 2022-07-18 11:29:35 +01:00
bake.go bake: recursively resolve groups 2022-09-12 13:51:34 +01:00
bake_test.go bake: recursively resolve groups 2022-09-12 13:51:34 +01:00
compose.go bake(compose): fix unskipped services without build context 2022-08-18 11:34:40 +02:00
compose_test.go bake: test compose file validation 2022-08-18 11:34:41 +02:00
hcl.go bake: restrict target name 2022-01-26 10:29:21 +01:00
hcl_test.go bake: add tests for missing attributes in userfuncs 2022-07-06 16:03:41 +01:00
remote.go bake: fix protocol detection 2021-11-02 23:12:27 +01:00