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

build: handle push/load shorthands for multi exporters #2302

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Mar 1, 2024

fixes docker/build-push-action#727

We forgot to handle push and load shorthands in #2290.

Keeping this one in draft while I'm working on integration tests.

EDIT: Argh GitHub is broken https://www.githubstatus.com/incidents/wcl1sw4mzg60

@crazy-max crazy-max requested review from tonistiigi and jedevc March 1, 2024 14:28
@crazy-max crazy-max force-pushed the multi-load-push branch 5 times, most recently from 7189b43 to 8763b12 Compare March 1, 2024 15:54
@crazy-max crazy-max marked this pull request as ready for review March 1, 2024 16:16
commands/bake.go Outdated Show resolved Hide resolved
@crazy-max crazy-max added this to the v0.13.0 milestone Mar 2, 2024
controller/build/build.go Outdated Show resolved Hide resolved
controller/build/build.go Outdated Show resolved Hide resolved
@crazy-max crazy-max force-pushed the multi-load-push branch 4 times, most recently from 9197a9b to c42c903 Compare March 5, 2024 07:57
@crazy-max crazy-max requested a review from tonistiigi March 5, 2024 07:58
@@ -99,36 +99,52 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
return nil, nil, err
}
if in.ExportPush {
if in.ExportLoad {
return nil, nil, errors.Errorf("push and load may not be set together at the moment")
}
if len(outputs) == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is not needed anymore. Else case behaves same way if len(outputs) == 0. Same for docker.

Copy link
Member Author

@crazy-max crazy-max Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, we are already checking if push/load is used.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@tonistiigi tonistiigi merged commit 9ebfde4 into docker:master Mar 5, 2024
63 checks passed
@crazy-max crazy-max deleted the multi-load-push branch March 6, 2024 08:52
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.

Feature Request: Save and Push
2 participants