mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
build: exit 1 when manifest merge failed
Signed-off-by: jaihwan104 <42341126+jaihwan104@users.noreply.github.com> (cherry picked from commit f2823515db645222e6abdb31dbd711debcb37687)
This commit is contained in:
parent
f6e57cf5b5
commit
f6830f3b86
@ -541,7 +541,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
|
|||||||
}
|
}
|
||||||
|
|
||||||
if pushNames != "" {
|
if pushNames != "" {
|
||||||
progress.Write(pw, fmt.Sprintf("merging manifest list %s", pushNames), func() error {
|
err := progress.Write(pw, fmt.Sprintf("merging manifest list %s", pushNames), func() error {
|
||||||
descs := make([]specs.Descriptor, 0, len(res))
|
descs := make([]specs.Descriptor, 0, len(res))
|
||||||
|
|
||||||
for _, r := range res {
|
for _, r := range res {
|
||||||
@ -637,6 +637,9 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
@ -15,7 +15,7 @@ type Writer interface {
|
|||||||
ClearLogSource(interface{})
|
ClearLogSource(interface{})
|
||||||
}
|
}
|
||||||
|
|
||||||
func Write(w Writer, name string, f func() error) {
|
func Write(w Writer, name string, f func() error) error {
|
||||||
dgst := digest.FromBytes([]byte(identity.NewID()))
|
dgst := digest.FromBytes([]byte(identity.NewID()))
|
||||||
tm := time.Now()
|
tm := time.Now()
|
||||||
|
|
||||||
@ -40,6 +40,8 @@ func Write(w Writer, name string, f func() error) {
|
|||||||
w.Write(&client.SolveStatus{
|
w.Write(&client.SolveStatus{
|
||||||
Vertexes: []*client.Vertex{&vtx2},
|
Vertexes: []*client.Vertex{&vtx2},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func WriteBuildRef(w Writer, target string, ref string) {
|
func WriteBuildRef(w Writer, target string, ref string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user