Skip the deployment if no manifests are defined
@@ -70,6 +70,10 @@ func (k *KubectlDeployer) Deploy(ctx context.Context, out io.Writer, builds []bu
return nil, errors.Wrap(err, "reading manifests")
}
+ if manifests.Empty() {
+ return []Artifact{}, nil
+ }
+
manifests, err = manifests.replaceImages(builds)
if err != nil {
return nil, errors.Wrap(err, "replacing images in manifests")
@@ -215,6 +219,10 @@ func (l *manifestList) String() string {
return str
}
+func (l *manifestList) Empty() bool {
+ return len(*l) == 0
+}
+
func (l *manifestList) reader() io.Reader {
return strings.NewReader(l.String())
}
