-
Notifications
You must be signed in to change notification settings - Fork 481
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
bake: contexts support with x-bake #1256
Conversation
bake/compose.go
Outdated
Pull *bool `yaml:"pull,omitempty"` | ||
NoCache *bool `yaml:"no-cache,omitempty"` | ||
NoCacheFilter stringArray `yaml:"no-cache-filter,omitempty"` | ||
Contexts map[string]string `yaml:"contexts,omitempty"` |
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.
Not sure if we should call this stringMap
for consistency? (even though the only reason we have stringArray
is for the custom UnmarshalYAML
case with CSV parsing).
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.
Good point to be consistent, I'm fine with it.
bake/compose.go
Outdated
@@ -263,3 +267,21 @@ func composeToBuildkitSecret(inp compose.ServiceSecretConfig, psecret compose.Se | |||
|
|||
return strings.Join(bkattrs, ","), nil | |||
} | |||
|
|||
func dedupMap(ms ...map[string]string) map[string]string { |
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.
We should put this next to dedupString
- maybe in a separate file if they don't both fit in a single file neatly?
dedupString
is a weird name as well for that now we'd have dedupMap
, maybe we could change it to dedupSlice
or equivalent?
Signed-off-by: CrazyMax <[email protected]>
fixes #1107
Signed-off-by: CrazyMax [email protected]