bake: allow pattern matching for target names in --set

Although bake is for running multiple targets, --set required a single
target name for overriding a property. This change allows matching
multiple targets for overrides.

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass
2020-04-21 21:47:40 +00:00
parent 721b63f3a0
commit 2bca8fa677
4 changed files with 81 additions and 55 deletions

View File

@@ -49,7 +49,7 @@ target "webapp" {
t.Run("InvalidTargetOverrides", func(t *testing.T) {
_, err := ReadTargets(ctx, []string{fp}, []string{"webapp"}, []string{"nosuchtarget.context=foo"})
require.NotNil(t, err)
require.Equal(t, err.Error(), "unknown target nosuchtarget")
require.Equal(t, err.Error(), "could not find any target matching 'nosuchtarget'")
})
t.Run("ArgsOverrides", func(t *testing.T) {