upgrade

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BinaryDownloadBaseURL the base URL for downloading the binary from - will always have "VERSION/jx-OS-ARCH.EXTENSION" appended to it when used
	BinaryDownloadBaseURL  = "https://github.com/jenkins-x/jx/releases/download/v"
	LatestVersionstreamURL = "https://github.com/jenkins-x/jx3-versions.git"
)

Variables

View Source
var GlobalBinaryPathAllowlist = []string{
	"az",
	"gcloud",
	"oc",
	"brew",
}

GlobalBinaryPathAllowlist binaries that require to be on the path but do not need to exist in JX_HOME/bin

Functions

func BinaryWithExtension

func BinaryWithExtension(binary string) string

Types

type CLIOptions

type CLIOptions struct {
	CommandRunner       cmdrunner.CommandRunner
	GitClient           gitclient.Interface
	JXClient            versioned.Interface
	Version             string
	VersionStreamGitURL string
	FromEnvironment     bool
}

UpgradeOptions the options for upgrading a cluster

func NewCmdUpgradeCLI

func NewCmdUpgradeCLI() (*cobra.Command, *CLIOptions)

NewCmdUpgrade creates a command object for the command

func (*CLIOptions) InstallJx

func (o *CLIOptions) InstallJx(upgrade bool, version string) error

InstallJx installs jx cli

func (*CLIOptions) NeedsUpgrade

func (o *CLIOptions) NeedsUpgrade(currentVersion, latestVersion semver.Version) bool

func (*CLIOptions) Run

func (o *CLIOptions) Run() error

Run implements the command

func (*CLIOptions) ShouldUpdate

func (o *CLIOptions) ShouldUpdate(newVersion semver.Version) (bool, error)

ShouldUpdate checks if CLI version should be updated

type Options

type Options struct {
	Cmd *cobra.Command
}

UpgradeOptions the options for upgrading a cluster

func NewCmdUpgrade

func NewCmdUpgrade() (*cobra.Command, *Options)

NewCmdUpgrade creates a command object for the command

func (*Options) Run

func (o *Options) Run() error

Run implements this command

type PluginOptions

type PluginOptions struct {
	CommandRunner cmdrunner.CommandRunner
	OnlyMandatory bool
	Boot          bool
	Path          string
}

UpgradeOptions the options for upgrading a cluster

func NewCmdUpgradePlugins

func NewCmdUpgradePlugins() (*cobra.Command, *PluginOptions)

NewCmdUpgrade creates a command object for the command

func (*PluginOptions) Run

func (o *PluginOptions) Run() error

Run implements the command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL