promote

package
v2.0.400-0...-14731b4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitStatusSuccess = "success"
)

Variables

This section is empty.

Functions

func NewCmdPromote

func NewCmdPromote(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdPromote creates the new command for: jx get prompt

Types

type PromoteOptions

type PromoteOptions struct {
	*opts.CommonOptions

	Namespace               string
	Environment             string
	Application             string
	Pipeline                string
	Build                   string
	Version                 string
	ReleaseName             string
	LocalHelmRepoName       string
	HelmRepositoryURL       string
	NoHelmUpdate            bool
	AllAutomatic            bool
	NoMergePullRequest      bool
	NoPoll                  bool
	NoWaitAfterMerge        bool
	IgnoreLocalFiles        bool
	NoWaitForUpdatePipeline bool
	Timeout                 string
	PullRequestPollTime     string
	Filter                  string
	Alias                   string

	// calculated fields
	TimeoutDuration         *time.Duration
	PullRequestPollDuration *time.Duration
	Activities              typev1.PipelineActivityInterface
	GitInfo                 *gits.GitRepository

	ReleaseInfo *ReleaseInfo

	// Used for testing
	CloneDir string
	// contains filtered or unexported fields
}

PromoteOptions containers the CLI options

func (*PromoteOptions) AddPromoteOptions

func (o *PromoteOptions) AddPromoteOptions(cmd *cobra.Command)

AddPromoteOptions adds command level options to `promote`

func (*PromoteOptions) CommentOnIssues

func (o *PromoteOptions) CommentOnIssues(targetNS string, environment *v1.Environment, promoteKey *kube.PromoteStepActivityKey) error

CommentOnIssues comments on any issues for a release that the fix is available in the given environment

func (*PromoteOptions) CreatePromoteKey

func (o *PromoteOptions) CreatePromoteKey(env *v1.Environment) *kube.PromoteStepActivityKey

func (*PromoteOptions) EnsureApplicationNameIsDefined

func (o *PromoteOptions) EnsureApplicationNameIsDefined(sf searchForChartFn, df discoverAppNameFn) error

EnsureApplicationNameIsDefined validates if an application name flag was provided by the user. If missing it will try to set it up or return an error

func (*PromoteOptions) GetEnvChartValues

func (o *PromoteOptions) GetEnvChartValues(targetNS string, env *v1.Environment) ([]string, []string)

func (*PromoteOptions) GetTargetNamespace

func (o *PromoteOptions) GetTargetNamespace(ns string, env string) (string, *v1.Environment, error)

func (*PromoteOptions) Promote

func (o *PromoteOptions) Promote(targetNS string, env *v1.Environment, warnIfAuto bool) (*ReleaseInfo, error)

func (*PromoteOptions) PromoteAllAutomatic

func (o *PromoteOptions) PromoteAllAutomatic() error

func (*PromoteOptions) PromoteViaPullRequest

func (o *PromoteOptions) PromoteViaPullRequest(env *v1.Environment, releaseInfo *ReleaseInfo) error

func (*PromoteOptions) Run

func (o *PromoteOptions) Run() error

Run implements this command

func (*PromoteOptions) SearchForChart

func (o *PromoteOptions) SearchForChart(filter string) (string, error)

func (*PromoteOptions) WaitForPromotion

func (o *PromoteOptions) WaitForPromotion(ns string, env *v1.Environment, releaseInfo *ReleaseInfo) error

type ReleaseInfo

type ReleaseInfo struct {
	ReleaseName     string
	FullAppName     string
	Version         string
	PullRequestInfo *gits.PullRequestInfo
}

Jump to

Keyboard shortcuts

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