Skip to content

Commit 70dc6a4

Browse files
committed
Don't enforce zero ingredient check
1 parent 6a9f844 commit 70dc6a4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/buildplan/buildplan.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ func Unmarshal(data []byte) (*BuildPlan, error) {
3737
return nil, errs.Wrap(err, "error hydrating build plan")
3838
}
3939

40-
if len(b.artifacts) == 0 || len(b.ingredients) == 0 || len(b.platforms) == 0 {
41-
return nil, errs.New("Buildplan unmarshalling failed as it got zero artifacts (%d), ingredients (%d) and or platforms (%d).",
42-
len(b.artifacts), len(b.ingredients), len(b.platforms))
40+
if len(b.artifacts) == 0 || len(b.platforms) == 0 {
41+
// Ingredients are not considered here because certain builds (eg. camel) won't be able to relate to a single ingredient
42+
return nil, errs.New("Buildplan unmarshalling failed as it got zero artifacts (%d) and/or platforms (%d).",
43+
len(b.artifacts), len(b.platforms))
4344
}
4445

4546
return b, nil

0 commit comments

Comments
 (0)