Documentation ¶
Index ¶
- Constants
- Variables
- func CreateBinaries(createURLFn func(Platform) string) []jenkinsv1.Binary
- func CreateJXPlugin(org, name, version string) jxCore.Plugin
- func EnsurePluginInstalled(plugin jxCore.Plugin, pluginBinDir string) (string, error)
- func EnsurePluginInstalledForAliasFile(plugin jxCore.Plugin, pluginBinDir string, aliasFileName string) (string, error)
- func FindPluginUrl(plugin jxCore.PluginSpec) (string, error)
- func ValidatePlugins(jxClient jxClient.Interface, ns string) error
- type CommandOverrideVerifier
- type PathVerifier
- type Platform
Constants ¶
const (
// PluginCommandLabel is the label applied to plugins to allow them to be found
PluginCommandLabel = "jenkins.io/pluginCommand"
)
Variables ¶
var ( // DefaultPlatforms the default list of platforms to create plugins for DefaultPlatforms = []Platform{ { Goarch: "amd64", Goos: "Windows", }, { Goarch: "amd64", Goos: "Darwin", }, { Goarch: "arm64", Goos: "Darwin", }, { Goarch: "amd64", Goos: "Linux", }, { Goarch: "arm64", Goos: "Linux", }, { Goarch: "386", Goos: "Linux", }, } )
Functions ¶
func CreateBinaries ¶
CreateBinaries a helper function to create the binary resources for the platforms for a given callback
func CreateJXPlugin ¶ added in v3.0.28
CreateJXPlugin creates a jx plugin
func EnsurePluginInstalled ¶
EnsurePluginInstalled ensures that the correct version of a plugin is installed locally. It will clean up old versions.
func EnsurePluginInstalledForAliasFile ¶
func EnsurePluginInstalledForAliasFile(plugin jxCore.Plugin, pluginBinDir string, aliasFileName string) (string, error)
EnsurePluginInstalledForAliasFile ensures that the correct version of a plugin is installed locally. It will clean up old versions.
func FindPluginUrl ¶
func FindPluginUrl(plugin jxCore.PluginSpec) (string, error)
FindPluginUrl finds the download URL for the current platform for a plugin
Types ¶
type CommandOverrideVerifier ¶
CommandOverrideVerifier verifies a set of plugins
func (*CommandOverrideVerifier) Verify ¶
func (v *CommandOverrideVerifier) Verify(path string) []error
Verify implements PathVerifier and determines if a given path is valid depending on whether or not it overwrites an existing jx command path, or a previously seen plugin.
type PathVerifier ¶
type PathVerifier interface { // Verify determines if a given path is valid Verify(path string) []error }
PathVerifier receives a path and determines if it is valid or not