Documentation ¶
Index ¶
- Constants
- Variables
- func AssertPluginVersion(versionCmdOut string, expectedPluginVersion string) error
- func CreatePluginsHttpDetails(rtDetails *config.ServerDetails) httputils.HttpClientDetails
- func GetLocalArchitecture() (string, error)
- func GetLocalPluginExecutableName(pluginName string) string
- func GetPluginPathInArtifactory(pluginName, pluginVersion, architecture string) string
- func GetPluginVersionDirInArtifactory(pluginName, pluginVersion string) string
- func GetPluginsRepo() string
- type Architecture
- type PluginBuildCmd
Constants ¶
View Source
const ( // This env var is mandatory for the 'publish' command. // The env var is optional for the install command - if provided, the plugin will be downloaded from a custom // plugins server, instead of the official registry. // The env var should store a server ID configured by JFrog CLI. PluginsServerEnv = "JFROG_CLI_PLUGINS_SERVER" // Used to set a custom plugins repo for the 'publish' & 'install' commands. PluginsRepoEnv = "JFROG_CLI_PLUGINS_REPO" DefaultPluginsRepo = "jfrog-cli-plugins" PluginsOfficialRegistryUrl = "https://releases.jfrog.io/artifactory/" LatestVersionName = "latest" )
Variables ¶
View Source
var ArchitecturesMap = map[string]Architecture{
"linux-386": {"linux", "386", ""},
"linux-amd64": {"linux", "amd64", ""},
"linux-s390x": {"linux", "s390x", ""},
"linux-arm64": {"linux", "arm64", ""},
"linux-arm": {"linux", "arm", ""},
"mac-386": {"darwin", "amd64", ""},
"windows-amd64": {"windows", "amd64", ".exe"},
}
Functions ¶
func AssertPluginVersion ¶ added in v1.47.0
Asserts a plugin's version is as expected, by parsing the output of the version command.
func CreatePluginsHttpDetails ¶
func CreatePluginsHttpDetails(rtDetails *config.ServerDetails) httputils.HttpClientDetails
func GetLocalArchitecture ¶
Get the local architecture name corresponding to the architectures that exist in registry.
func GetPluginPathInArtifactory ¶
Returns the full path of a plugin in Artifactory. Example path: "repo-name/plugin-name/version/architecture-name/executable-name"
func GetPluginVersionDirInArtifactory ¶
Example path: "repo-name/plugin-name/v1.0.0/"
func GetPluginsRepo ¶
func GetPluginsRepo() string
Returns a custom plugins repo if provided, default otherwise.
Types ¶
type Architecture ¶
type PluginBuildCmd ¶
Command used to build plugins.
func (*PluginBuildCmd) GetCmd ¶
func (buildCmd *PluginBuildCmd) GetCmd() *exec.Cmd
func (*PluginBuildCmd) GetEnv ¶
func (buildCmd *PluginBuildCmd) GetEnv() map[string]string
func (*PluginBuildCmd) GetErrWriter ¶
func (buildCmd *PluginBuildCmd) GetErrWriter() io.WriteCloser
func (*PluginBuildCmd) GetStdWriter ¶
func (buildCmd *PluginBuildCmd) GetStdWriter() io.WriteCloser
Click to show internal directories.
Click to hide internal directories.