Skip to content

Commit fbcf4a8

Browse files
authored
Merge pull request #832 from ccojocar/empty_manifests
Skip the deployment if no manifests are defined
2 parents 9be665d + 66f9acd commit fbcf4a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/skaffold/deploy/kubectl.go

+8
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ func (k *KubectlDeployer) Deploy(ctx context.Context, out io.Writer, builds []bu
7070
return nil, errors.Wrap(err, "reading manifests")
7171
}
7272

73+
if manifests.Empty() {
74+
return []Artifact{}, nil
75+
}
76+
7377
manifests, err = manifests.replaceImages(builds)
7478
if err != nil {
7579
return nil, errors.Wrap(err, "replacing images in manifests")
@@ -215,6 +219,10 @@ func (l *manifestList) String() string {
215219
return str
216220
}
217221

222+
func (l *manifestList) Empty() bool {
223+
return len(*l) == 0
224+
}
225+
218226
func (l *manifestList) reader() io.Reader {
219227
return strings.NewReader(l.String())
220228
}

0 commit comments

Comments
 (0)