Skip to content
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

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Conversation

crazy-max
Copy link
Member

fixes #1107

Signed-off-by: CrazyMax [email protected]

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"`
Copy link
Collaborator

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).

Copy link
Member Author

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 {
Copy link
Collaborator

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?

@crazy-max crazy-max added this to the v0.9.0 milestone Aug 8, 2022
@tonistiigi tonistiigi merged commit 64ac6c9 into docker:master Aug 8, 2022
@crazy-max crazy-max deleted the x-bake-miss branch September 13, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple build contexts in x-bake
3 participants