Skip to content

Commit

Permalink
feat: enable plugin validation
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Nov 28, 2018
1 parent f5b52f9 commit 99bac62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/extensions/plugins.go
Expand Up @@ -217,6 +217,7 @@ func EnsurePluginInstalled(plugin jenkinsv1.Plugin) (string, error) {
return path, nil
}

// TODO needs a test
func ValidatePlugins(jxClient jenkinsv1client.Interface, ns string) error {
// Validate installed plugins
plugins, err := jxClient.JenkinsV1().Plugins(ns).List(metav1.ListOptions{})
Expand Down
11 changes: 11 additions & 0 deletions pkg/jx/cmd/get_plugins.go
Expand Up @@ -133,5 +133,16 @@ func (o *GetPluginsOptions) PrintExtensionPlugins() error {
// Add a trailing line to make the output more readable
log.Infoln("")
}

jxClient, ns, err := o.JXClientAndDevNamespace()
if err != nil {
return err
}

err = extensions.ValidatePlugins(jxClient, ns)
if err != nil {
return err
}

return nil
}

0 comments on commit 99bac62

Please sign in to comment.