Adding in diff plugin execution

- Simple copy-paste for the most part from sync job.  I had started down
the path of adding in a meta PluginCommand directive and trying to make it
more modular, but in the end there are some small differences between
the execution that were a bit difficult to model and it just got ugly.
Figured keeping it simple would be easier to manage
This commit is contained in:
Justin Nauman
2017-08-17 23:49:06 -05:00
parent 2abc93cc62
commit e0b324b69b
4 changed files with 90 additions and 0 deletions
+12
View File
@@ -76,6 +76,18 @@ func (helm *execer) SyncChart(name, chart string, flags ...string) error {
return err
}
func (helm *execer) DiffChart(name, chart string, flags ...string) error {
chart, err := normalizeChart(chart)
if err != nil {
return err
}
out, err := helm.exec(append([]string{"diff", name, chart}, flags...)...)
if helm.writer != nil {
helm.writer.Write(out)
}
return err
}
func (helm *execer) DeleteChart(name string) error {
out, err := helm.exec("delete", name)
if helm.writer != nil {
+1
View File
@@ -7,5 +7,6 @@ type Interface interface {
UpdateRepo() error
SyncChart(name, chart string, flags ...string) error
DiffChart(name, chart string, flags ...string) error
DeleteChart(name string) error
}