View Source
const (
	// DocTypeMarkdown represents markdown type of doc
	DocTypeMarkdown string = "Markdown"
	// DocTypeManPage represents man page type of doc
	DocTypeManPage string = "ManPage"
View Source
const (
	// UTF8 is the chart set name
	UTF8 = "UTF-8"
	// GB18030 is the chart set name
	GB18030 = "GB18030"
View Source
const (
	// AgentJNLP is the agent type of jnlp
	AgentJNLP = "jnlp"
View Source
const (
	// SafeShutdown the text about shutdown safely
	SafeShutdown = "Puts Jenkins into the quiet mode, wait for existing builds to be completed, and then shut down Jenkins"


View Source
var ShellTypes = []string{
	"zsh", "bash", "powerShell",

    ShellTypes contains all types of shell


    func ConvertByte2String

    func ConvertByte2String(byte []byte, charset string) string

      ConvertByte2String convert byte to string

      func Execute

      func Execute()

        Execute will execute the command

        func GenerateSampleConfig

        func GenerateSampleConfig() ([]byte, error)

          GenerateSampleConfig returns a sample config

          func GetCategories

          func GetCategories(jclient *client.JobClient) (
          	typeMap map[string]string, types []string, err error)

            GetCategories returns the categories of current Jenkins

            func GetComputerClient

            func GetComputerClient(option common.Option) (*client.ComputerClient, *appCfg.JenkinsServer)

              GetComputerClient returns the client of computer

              func GetConfigFromHome

              func GetConfigFromHome() (configPath string, homeErr error)

                GetConfigFromHome returns the config file path from user home dir

                func GetCurrentJenkinsAndClient

                func GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) (jenkins *appCfg.JenkinsServer)

                  GetCurrentJenkinsAndClient returns the client

                  func GetCurrentJenkinsFromOptions

                  func GetCurrentJenkinsFromOptions() (jenkinsServer *appCfg.JenkinsServer)

                    GetCurrentJenkinsFromOptions return the jenkins server

                    func GetHealthCheckRegister

                    func GetHealthCheckRegister() *health.CheckRegister

                      GetHealthCheckRegister return the instance of health check register

                      func GetRootCommand

                      func GetRootCommand() *cobra.Command

                        GetRootCommand returns the root cmd

                        func NewShutdownCmd

                        func NewShutdownCmd(rootOpt *RootOptions) (cmd *cobra.Command)

                          NewShutdownCmd create the shutdown command

                          func RenderTemplate

                          func RenderTemplate(filepath string, values map[string]string) (result string, err error)

                            RenderTemplate render a go template to a temporary file

                            func ResetJobBuildOption

                            func ResetJobBuildOption()

                              ResetJobBuildOption give it a clean option struct

                              func SortPlugins

                              func SortPlugins(plugins []jenkinsFormula.Plugin) []jenkinsFormula.Plugin

                                SortPlugins sort the plugins by asc

                                func ValidAgentNames

                                func ValidAgentNames(cmd *cobra.Command, args []string, prefix string) (agentNames []string, directive cobra.ShellCompDirective)

                                  ValidAgentNames autocomplete with agent names

                                  func ValidJenkinsAndDataNames

                                  func ValidJenkinsAndDataNames(cmd *cobra.Command, args []string, prefix string) (result []string, directive cobra.ShellCompDirective)

                                    ValidJenkinsAndDataNames autocomplete with Jenkins names

                                    func ValidJenkinsNames

                                    func ValidJenkinsNames(_ *cobra.Command, args []string, prefix string) (jenkinsNames []string, directive cobra.ShellCompDirective)

                                      ValidJenkinsNames autocomplete with Jenkins names


                                      type CWPOptions

                                      type CWPOptions struct {
                                      	ConfigPath      string
                                      	Version         string
                                      	TmpDir          string
                                      	Environment     string
                                      	BomPath         string
                                      	MvnSettingsFile string
                                      	BatchMode        bool
                                      	Demo             bool
                                      	InstallArtifacts bool
                                      	ShowProgress bool
                                      	MetadataURL  string
                                      	LocalCache   string
                                      	PrintVersion bool
                                      	ValueSet map[string]string

                                        CWPOptions is the option of custom-war-packager see also

                                        func (*CWPOptions) Download

                                        func (o *CWPOptions) Download() (err error)

                                          Download get the latest cwp from server into local

                                          func (*CWPOptions) GetCWPURL

                                          func (o *CWPOptions) GetCWPURL(version string) string

                                            GetCWPURL returns the download URL of a specific version cwp

                                            func (*CWPOptions) GetLatest

                                            func (o *CWPOptions) GetLatest() (version string, err error)

                                              GetLatest returns the latest of cwp

                                              func (*CWPOptions) Run

                                              func (o *CWPOptions) Run(cmd *cobra.Command, args []string) (err error)

                                                Run is the main logic of cwp cmd

                                                type CenterDownloadOption

                                                type CenterDownloadOption struct {
                                                	LTS     bool
                                                	Mirror  string
                                                	Version string
                                                	Output       string
                                                	ShowProgress bool
                                                	Formula string
                                                	Thread       int
                                                	RoundTripper http.RoundTripper

                                                  CenterDownloadOption as the options of download command

                                                  func (*CenterDownloadOption) DownloadJenkins

                                                  func (c *CenterDownloadOption) DownloadJenkins() (err error)

                                                    DownloadJenkins download the Jenkins

                                                    type CenterIdentityOption

                                                    type CenterIdentityOption struct {

                                                      CenterIdentityOption option for upgrade Jenkins

                                                      type CenterLoginOption

                                                      type CenterLoginOption struct {
                                                      	RoundTripper http.RoundTripper

                                                        CenterLoginOption option for upgrade Jenkins

                                                        type CenterMirrorOption

                                                        type CenterMirrorOption struct {
                                                        	RoundTripper http.RoundTripper
                                                        	Enable    bool
                                                        	MirrorURL string

                                                          CenterMirrorOption option for upgrade Jenkins

                                                          type CenterOption

                                                          type CenterOption struct {
                                                          	RoundTripper http.RoundTripper
                                                          	CenterStatus string

                                                            CenterOption is the center cmd option

                                                            type CenterStartOption

                                                            type CenterStartOption struct {
                                                            	Port                      int
                                                            	AgentPort                 int
                                                            	Context                   string
                                                            	SetupWizard               bool
                                                            	AdminCanGenerateNewTokens bool
                                                            	CleanHome                 bool
                                                            	// comes from folder plugin
                                                            	ConcurrentIndexing int
                                                            	Admin string
                                                            	HTTPSEnable      bool
                                                            	HTTPSPort        int
                                                            	HTTPSCertificate string
                                                            	HTTPSPrivateKey  string
                                                            	Environments []string
                                                            	System       []string
                                                            	Download     bool
                                                            	Mirror       string
                                                            	Thread       int
                                                            	Version      string
                                                            	LTS          bool
                                                            	Formula      string
                                                            	RandomWebDir bool
                                                            	Mode          string
                                                            	Image         string
                                                            	ForcePull     bool
                                                            	ContainerUser string
                                                            	DryRun        bool

                                                              CenterStartOption option for upgrade Jenkins

                                                              type CenterUpgradeOption

                                                              type CenterUpgradeOption struct {
                                                              	RoundTripper http.RoundTripper

                                                                CenterUpgradeOption option for upgrade Jenkins

                                                                type CenterWatchOption

                                                                type CenterWatchOption struct {
                                                                	UtilNeedRestart     bool
                                                                	UtilInstallComplete bool
                                                                	RoundTripper  http.RoundTripper
                                                                	CeneterStatus string

                                                                  CenterWatchOption as the options of watch command

                                                                  type CheckResult

                                                                  type CheckResult struct {
                                                                  	Name       string
                                                                  	StatusCode int
                                                                  	Timeout    bool

                                                                    CheckResult is the result of checking

                                                                    type CompletionOptions

                                                                    type CompletionOptions struct {
                                                                    	Type string

                                                                      CompletionOptions is the option of completion command

                                                                      type ComputerCreateOption

                                                                      type ComputerCreateOption struct {

                                                                        ComputerCreateOption option for config list command

                                                                        type ComputerDeleteOption

                                                                        type ComputerDeleteOption struct {

                                                                          ComputerDeleteOption option for agent delete command

                                                                          type ComputerLaunchOption

                                                                          type ComputerLaunchOption struct {
                                                                          	Type         string
                                                                          	ShowProgress bool
                                                                          	/** share info between inner functions */
                                                                          	ComputerClient *client.ComputerClient
                                                                          	CurrentJenkins *appCfg.JenkinsServer
                                                                          	Output         string
                                                                          	Mode                 LaunchMode
                                                                          	Remove               bool
                                                                          	Restart              string
                                                                          	Detach               bool
                                                                          	AgentType            JNLPAgentImage
                                                                          	AgentImageTag        string
                                                                          	GeneralAgentImageTag string
                                                                          	CustomImage          string

                                                                            ComputerLaunchOption option for config list command

                                                                            func (*ComputerLaunchOption) Check

                                                                            func (o *ComputerLaunchOption) Check() (err error)

                                                                              Check do the health check of casc cmd

                                                                              func (*ComputerLaunchOption) Launch

                                                                              func (o *ComputerLaunchOption) Launch(name string) (err error)

                                                                                Launch start a normal agent

                                                                                func (*ComputerLaunchOption) LaunchJnlp

                                                                                func (o *ComputerLaunchOption) LaunchJnlp(name string) (err error)

                                                                                  LaunchJnlp start a JNLP agent

                                                                                  type ComputerListOption

                                                                                  type ComputerListOption struct {

                                                                                    ComputerListOption option for config list command

                                                                                    type ComputerLogOption

                                                                                    type ComputerLogOption struct {

                                                                                      ComputerLogOption option for config list command

                                                                                      type ConfigAddOptions

                                                                                      type ConfigAddOptions struct {

                                                                                        ConfigAddOptions is the config ad option

                                                                                        type ConfigCleanOption

                                                                                        type ConfigCleanOption struct {
                                                                                        	Timeout      int
                                                                                        	CleanTimeout bool
                                                                                        	Logger helper.Printer

                                                                                          ConfigCleanOption option for config list command

                                                                                          func (*ConfigCleanOption) Check

                                                                                          func (o *ConfigCleanOption) Check(jenkins cfg.JenkinsServer) (result CheckResult)

                                                                                            Check check the target JenkinsServer config make a request to a Jenkins API

                                                                                            func (*ConfigCleanOption) CleanByCondition

                                                                                            func (o *ConfigCleanOption) CleanByCondition(resultList []CheckResult) (err error)

                                                                                              CleanByCondition do the clean work by conditions

                                                                                              func (*ConfigCleanOption) Run

                                                                                              func (o *ConfigCleanOption) Run(cmd *cobra.Command, args []string) (err error)

                                                                                                Run is the main entry point of command config-clean

                                                                                                type ConfigDataOptions

                                                                                                type ConfigDataOptions struct {
                                                                                                	Key   string
                                                                                                	Value string

                                                                                                  ConfigDataOptions is the config data option

                                                                                                  type ConfigEditOption

                                                                                                  type ConfigEditOption struct {

                                                                                                    ConfigEditOption is the option for edit config command

                                                                                                    type ConfigGenerateOption

                                                                                                    type ConfigGenerateOption struct {
                                                                                                    	Copy bool

                                                                                                      ConfigGenerateOption is the config generate cmd option

                                                                                                      func (*ConfigGenerateOption) InteractiveWithConfig

                                                                                                      func (o *ConfigGenerateOption) InteractiveWithConfig(cmd *cobra.Command, data []byte) (err error)

                                                                                                        InteractiveWithConfig be friendly for a newer

                                                                                                        type ConfigListOption

                                                                                                        type ConfigListOption struct {
                                                                                                        	Config string

                                                                                                          ConfigListOption option for config list command

                                                                                                          type ConfigOptions

                                                                                                          type ConfigOptions struct {
                                                                                                          	ConfigFileLocation string
                                                                                                          	Detail             bool
                                                                                                          	Decrypt            bool

                                                                                                            ConfigOptions is the config cmd option

                                                                                                            type ConfigSelectOptions

                                                                                                            type ConfigSelectOptions struct {

                                                                                                              ConfigSelectOptions is the option for select a config

                                                                                                              type CredentialCreateOption

                                                                                                              type CredentialCreateOption struct {
                                                                                                              	Description string
                                                                                                              	ID          string
                                                                                                              	Store       string
                                                                                                              	Username string
                                                                                                              	Password string
                                                                                                              	Secret string
                                                                                                              	Scope string
                                                                                                              	Type  string
                                                                                                              	RoundTripper http.RoundTripper

                                                                                                                CredentialCreateOption option for credential delete command

                                                                                                                type CredentialDeleteOption

                                                                                                                type CredentialDeleteOption struct {
                                                                                                                	ID    string
                                                                                                                	Store string
                                                                                                                	RoundTripper http.RoundTripper

                                                                                                                  CredentialDeleteOption option for credential delete command

                                                                                                                  type CredentialListOption

                                                                                                                  type CredentialListOption struct {
                                                                                                                  	Store string
                                                                                                                  	RoundTripper http.RoundTripper

                                                                                                                    CredentialListOption option for credential list command

                                                                                                                    type CrumbIssuerOptions

                                                                                                                    type CrumbIssuerOptions struct {
                                                                                                                    	RoundTripper http.RoundTripper

                                                                                                                      CrumbIssuerOptions contains the command line options

                                                                                                                      type DocOption

                                                                                                                      type DocOption struct {
                                                                                                                      	DocType string

                                                                                                                        DocOption is the option for doc generating

                                                                                                                        type JNLPAgentImage

                                                                                                                        type JNLPAgentImage string

                                                                                                                          JNLPAgentImage is the type of Jenkins JNLP agent image

                                                                                                                          const (
                                                                                                                          	// GenericAgentImage represents JNLP agent image for generic
                                                                                                                          	GenericAgentImage JNLPAgentImage = "generic"
                                                                                                                          	// GolangAgentImage represents JNLP agent image for golang
                                                                                                                          	GolangAgentImage JNLPAgentImage = "golang"
                                                                                                                          	// MavenAgentImage represents JNLP agent image for maven
                                                                                                                          	MavenAgentImage JNLPAgentImage = "maven"
                                                                                                                          	// PythonAgentImage represents JNLP agent image for python
                                                                                                                          	PythonAgentImage JNLPAgentImage = "python"
                                                                                                                          	// NodeAgentImage represents JNLP agent image for node
                                                                                                                          	NodeAgentImage JNLPAgentImage = "node"
                                                                                                                          	// RubyAgentImage represents JNLP agent image for ruby
                                                                                                                          	RubyAgentImage JNLPAgentImage = "ruby"
                                                                                                                          	// DockerAgentImage represents JNLP agent image for docker
                                                                                                                          	DockerAgentImage JNLPAgentImage = "docker"
                                                                                                                          	// TerraformAgentImage represents JNLP agent image for terraform
                                                                                                                          	TerraformAgentImage JNLPAgentImage = "terraform"
                                                                                                                          	// CustomAgentImage represents JNLP agent image for custom
                                                                                                                          	CustomAgentImage JNLPAgentImage = "custom"

                                                                                                                          func (JNLPAgentImage) All

                                                                                                                          func (i JNLPAgentImage) All() []string

                                                                                                                            All returns all the supported image list

                                                                                                                            func (*JNLPAgentImage) Set

                                                                                                                            func (i *JNLPAgentImage) Set(s string) (err error)

                                                                                                                              Set give a appropriate value

                                                                                                                              func (JNLPAgentImage) String

                                                                                                                              func (i JNLPAgentImage) String() string

                                                                                                                                String returns the string format of JNLPAgentImage

                                                                                                                                func (JNLPAgentImage) Type

                                                                                                                                func (i JNLPAgentImage) Type() string

                                                                                                                                  Type returns the type of current struct

                                                                                                                                  type JobArtifactDownloadOption

                                                                                                                                  type JobArtifactDownloadOption struct {
                                                                                                                                  	ID           string
                                                                                                                                  	ShowProgress bool
                                                                                                                                  	DownloadDir  string
                                                                                                                                  	Jenkins      *appCfg.JenkinsServer
                                                                                                                                  	RoundTripper http.RoundTripper

                                                                                                                                    JobArtifactDownloadOption is the options of job artifact download command

                                                                                                                                    type JobArtifactOption

                                                                                                                                    type JobArtifactOption struct {

                                                                                                                                      JobArtifactOption is the options of job artifact command

                                                                                                                                      type JobBuildOption

                                                                                                                                      type JobBuildOption struct {
                                                                                                                                      	Param      string
                                                                                                                                      	ParamArray []string
                                                                                                                                      	ParamFilePathArray []string
                                                                                                                                      	Wait     bool
                                                                                                                                      	WaitTime int
                                                                                                                                      	Delay    int
                                                                                                                                      	Cause    string

                                                                                                                                        JobBuildOption is the job build option

                                                                                                                                        type JobCreateOption

                                                                                                                                        type JobCreateOption struct {
                                                                                                                                        	Copy string
                                                                                                                                        	Type string
                                                                                                                                        	RoundTripper http.RoundTripper

                                                                                                                                          JobCreateOption is the job create option

                                                                                                                                          type JobDeleteOption

                                                                                                                                          type JobDeleteOption struct {

                                                                                                                                            JobDeleteOption is the job delete option

                                                                                                                                            type JobDisableOption

                                                                                                                                            type JobDisableOption struct {

                                                                                                                                              JobDisableOption is the job delete option

                                                                                                                                              type JobEditOption

                                                                                                                                              type JobEditOption struct {
                                                                                                                                              	Filename  string
                                                                                                                                              	Script    string
                                                                                                                                              	URL       string
                                                                                                                                              	Sample    bool
                                                                                                                                              	TrimSpace bool
                                                                                                                                              	// Build flag indicates if trigger the Jenkins job after the action of edit
                                                                                                                                              	Build bool

                                                                                                                                                JobEditOption is the option for job create command

                                                                                                                                                type JobEnableOption

                                                                                                                                                type JobEnableOption struct {

                                                                                                                                                  JobEnableOption is the job delete option

                                                                                                                                                  type JobHistoryOption

                                                                                                                                                  type JobHistoryOption struct {
                                                                                                                                                  	Delete       int
                                                                                                                                                  	RoundTripper http.RoundTripper

                                                                                                                                                    JobHistoryOption is the job history option

                                                                                                                                                    type JobInputOption

                                                                                                                                                    type JobInputOption struct {
                                                                                                                                                    	Action string
                                                                                                                                                    	RoundTripper http.RoundTripper

                                                                                                                                                      JobInputOption is the job delete option

                                                                                                                                                      type JobLogOption

                                                                                                                                                      type JobLogOption struct {
                                                                                                                                                      	History int
                                                                                                                                                      	LogText      string
                                                                                                                                                      	LastBuildID  int
                                                                                                                                                      	LastBuildURL string
                                                                                                                                                      	RoundTripper http.RoundTripper

                                                                                                                                                        JobLogOption is the job log option

                                                                                                                                                        type JobOption

                                                                                                                                                        type JobOption struct {

                                                                                                                                                          JobOption is the job cmd option

                                                                                                                                                          type JobParamOption

                                                                                                                                                          type JobParamOption struct {
                                                                                                                                                          	Indent bool
                                                                                                                                                          	Remove string
                                                                                                                                                          	Add    string
                                                                                                                                                          	RoundTripper http.RoundTripper

                                                                                                                                                            JobParamOption is the job param option

                                                                                                                                                            type JobSearchOption

                                                                                                                                                            type JobSearchOption struct {
                                                                                                                                                            	Name   string
                                                                                                                                                            	Type   string
                                                                                                                                                            	Parent string
                                                                                                                                                            	Start int
                                                                                                                                                            	Limit int

                                                                                                                                                              JobSearchOption is the options of job search command

                                                                                                                                                              func (*JobSearchOption) Check

                                                                                                                                                              func (o *JobSearchOption) Check() (err error)

                                                                                                                                                                Check do the conditions check

                                                                                                                                                                type JobStopOption

                                                                                                                                                                type JobStopOption struct {

                                                                                                                                                                  JobStopOption is the job stop option

                                                                                                                                                                  type JobTypeOption

                                                                                                                                                                  type JobTypeOption struct {

                                                                                                                                                                    JobTypeOption is the job type cmd option

                                                                                                                                                                    type LaunchMode

                                                                                                                                                                    type LaunchMode string

                                                                                                                                                                      LaunchMode represents Jenkins agent launch mode

                                                                                                                                                                      const (
                                                                                                                                                                      	// LaunchModeJava represents java launch mode
                                                                                                                                                                      	LaunchModeJava LaunchMode = "java"
                                                                                                                                                                      	// LaunchModeDocker represents docker launch mode
                                                                                                                                                                      	LaunchModeDocker LaunchMode = "docker"

                                                                                                                                                                      func (LaunchMode) All

                                                                                                                                                                      func (l LaunchMode) All() []string

                                                                                                                                                                        All returns all launch modes

                                                                                                                                                                        func (LaunchMode) Equal

                                                                                                                                                                        func (l LaunchMode) Equal(mode string) bool

                                                                                                                                                                          Equal determine if they are same

                                                                                                                                                                          func (*LaunchMode) Set

                                                                                                                                                                          func (l *LaunchMode) Set(s string) (err error)

                                                                                                                                                                            Set give a appropriate value

                                                                                                                                                                            func (LaunchMode) String

                                                                                                                                                                            func (l LaunchMode) String() string

                                                                                                                                                                              String returns the string of the mode

                                                                                                                                                                              func (LaunchMode) Type

                                                                                                                                                                              func (l LaunchMode) Type() string

                                                                                                                                                                                Type returns the type of current struct

                                                                                                                                                                                type MavenMetadata

                                                                                                                                                                                type MavenMetadata struct {
                                                                                                                                                                                	XMLName    xml.Name        `xml:"metadata"`
                                                                                                                                                                                	Versioning MavenVersioning `xml:"versioning"`

                                                                                                                                                                                  MavenMetadata is the maven metadata xml root

                                                                                                                                                                                  type MavenVersioning

                                                                                                                                                                                  type MavenVersioning struct {
                                                                                                                                                                                  	XMLName xml.Name `xml:"versioning"`
                                                                                                                                                                                  	Latest  string   `xml:"latest"`
                                                                                                                                                                                  	Release string   `xml:"release"`

                                                                                                                                                                                    MavenVersioning is the versioning of maven

                                                                                                                                                                                    type OpenOption

                                                                                                                                                                                    type OpenOption struct {
                                                                                                                                                                                    	Browser string
                                                                                                                                                                                    	Config bool

                                                                                                                                                                                      OpenOption is the open cmd option

                                                                                                                                                                                      type PluginBuildOptions

                                                                                                                                                                                      type PluginBuildOptions struct {
                                                                                                                                                                                      	DebugOutput bool

                                                                                                                                                                                        PluginBuildOptions for the plugin build command

                                                                                                                                                                                        type PluginCheckoutOption

                                                                                                                                                                                        type PluginCheckoutOption struct {
                                                                                                                                                                                        	RoundTripper http.RoundTripper
                                                                                                                                                                                        	// Timeout is the timeout setting for check Jenkins update-center
                                                                                                                                                                                        	Timeout int64

                                                                                                                                                                                          PluginCheckoutOption is the option for plugin checkout command

                                                                                                                                                                                          type PluginCreateOptions

                                                                                                                                                                                          type PluginCreateOptions struct {
                                                                                                                                                                                          	DebugOutput bool

                                                                                                                                                                                            PluginCreateOptions for the plugin create command

                                                                                                                                                                                            type PluginDownloadOption

                                                                                                                                                                                            type PluginDownloadOption struct {
                                                                                                                                                                                            	SkipDependency bool
                                                                                                                                                                                            	SkipOptional   bool
                                                                                                                                                                                            	UseMirror      bool
                                                                                                                                                                                            	Mirror         string
                                                                                                                                                                                            	ShowProgress   bool
                                                                                                                                                                                            	DownloadDir    string
                                                                                                                                                                                            	RoundTripper http.RoundTripper

                                                                                                                                                                                              PluginDownloadOption is the option for plugin download command

                                                                                                                                                                                              type PluginFormulaOption

                                                                                                                                                                                              type PluginFormulaOption struct {
                                                                                                                                                                                              	// OnlyRelease indicated that we only output the release version of plugins
                                                                                                                                                                                              	OnlyRelease bool
                                                                                                                                                                                              	// DockerBuild indicated if build docker image
                                                                                                                                                                                              	DockerBuild  bool
                                                                                                                                                                                              	SortPlugins  bool
                                                                                                                                                                                              	RoundTripper http.RoundTripper

                                                                                                                                                                                                PluginFormulaOption option for plugin formula command

                                                                                                                                                                                                func (*PluginFormulaOption) Check

                                                                                                                                                                                                func (o *PluginFormulaOption) Check() (err error)

                                                                                                                                                                                                  Check do the health check of plugin formula cmd

                                                                                                                                                                                                  type PluginInstallOption

                                                                                                                                                                                                  type PluginInstallOption struct {
                                                                                                                                                                                                  	UseMirror    bool
                                                                                                                                                                                                  	ShowProgress bool
                                                                                                                                                                                                  	Formula      string
                                                                                                                                                                                                  	RoundTripper http.RoundTripper

                                                                                                                                                                                                    PluginInstallOption is the option for plugin install

                                                                                                                                                                                                    type PluginListOption

                                                                                                                                                                                                    type PluginListOption struct {
                                                                                                                                                                                                    	RoundTripper http.RoundTripper

                                                                                                                                                                                                      PluginListOption option for plugin list command

                                                                                                                                                                                                      type PluginOpenOption

                                                                                                                                                                                                      type PluginOpenOption struct {
                                                                                                                                                                                                      	ExecContext util.ExecContext
                                                                                                                                                                                                      	Browser string

                                                                                                                                                                                                        PluginOpenOption is the option of plugin open cmd

                                                                                                                                                                                                        type PluginOptions

                                                                                                                                                                                                        type PluginOptions struct {
                                                                                                                                                                                                        	Suite string

                                                                                                                                                                                                          PluginOptions contains the command line options

                                                                                                                                                                                                          func (*PluginOptions) FindPlugin

                                                                                                                                                                                                          func (o *PluginOptions) FindPlugin(name string) (plugin *client.InstalledPlugin, err error)

                                                                                                                                                                                                            FindPlugin find a plugin by name

                                                                                                                                                                                                            type PluginReleaseOptions

                                                                                                                                                                                                            type PluginReleaseOptions struct {
                                                                                                                                                                                                            	Batch       bool
                                                                                                                                                                                                            	Prepare     bool
                                                                                                                                                                                                            	Perform     bool
                                                                                                                                                                                                            	SkipTests   bool
                                                                                                                                                                                                            	DebugOutput bool

                                                                                                                                                                                                              PluginReleaseOptions for the plugin create command

                                                                                                                                                                                                              type PluginRunOptions

                                                                                                                                                                                                              type PluginRunOptions struct {
                                                                                                                                                                                                              	CleanHome   bool
                                                                                                                                                                                                              	DebugOutput bool

                                                                                                                                                                                                                PluginRunOptions for the plugin run command

                                                                                                                                                                                                                type PluginSearchOption

                                                                                                                                                                                                                type PluginSearchOption struct {
                                                                                                                                                                                                                	RoundTripper http.RoundTripper

                                                                                                                                                                                                                  PluginSearchOption is the plugin search option

                                                                                                                                                                                                                  func (*PluginSearchOption) Output

                                                                                                                                                                                                                  func (o *PluginSearchOption) Output(obj interface{}) (data []byte, err error)

                                                                                                                                                                                                                    Output output the data into buffer

                                                                                                                                                                                                                    type PluginTreadOption

                                                                                                                                                                                                                    type PluginTreadOption struct {
                                                                                                                                                                                                                    	RoundTripper http.RoundTripper

                                                                                                                                                                                                                      PluginTreadOption is the option of plugin trend command

                                                                                                                                                                                                                      type PluginUninstallOption

                                                                                                                                                                                                                      type PluginUninstallOption struct {
                                                                                                                                                                                                                      	RoundTripper http.RoundTripper

                                                                                                                                                                                                                        PluginUninstallOption the option of uninstall a plugin

                                                                                                                                                                                                                        type PluginUpgradeOption

                                                                                                                                                                                                                        type PluginUpgradeOption struct {
                                                                                                                                                                                                                        	Filter []string
                                                                                                                                                                                                                        	All    bool
                                                                                                                                                                                                                        	RoundTripper http.RoundTripper

                                                                                                                                                                                                                          PluginUpgradeOption option for plugin list command

                                                                                                                                                                                                                          type PluginUploadOption

                                                                                                                                                                                                                          type PluginUploadOption struct {
                                                                                                                                                                                                                          	Remote         string
                                                                                                                                                                                                                          	RemoteUser     string
                                                                                                                                                                                                                          	RemotePassword string
                                                                                                                                                                                                                          	RemoteJenkins  string
                                                                                                                                                                                                                          	ShowProgress   bool
                                                                                                                                                                                                                          	FileName       string
                                                                                                                                                                                                                          	// Timeout is the timeout when upload the plugin
                                                                                                                                                                                                                          	Timeout int64
                                                                                                                                                                                                                          	RoundTripper http.RoundTripper
                                                                                                                                                                                                                          	// contains filtered or unexported fields

                                                                                                                                                                                                                            PluginUploadOption will hold the options of plugin cmd

                                                                                                                                                                                                                            func (*PluginUploadOption) HPICompletion

                                                                                                                                                                                                                            func (o *PluginUploadOption) HPICompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

                                                                                                                                                                                                                              HPICompletion auto find the *.hpi files

                                                                                                                                                                                                                              type QueueCancelOption

                                                                                                                                                                                                                              type QueueCancelOption struct {
                                                                                                                                                                                                                              	RoundTripper http.RoundTripper

                                                                                                                                                                                                                                QueueCancelOption represents the option of queue cancel command

                                                                                                                                                                                                                                type QueueListOption

                                                                                                                                                                                                                                type QueueListOption struct {
                                                                                                                                                                                                                                	RoundTripper http.RoundTripper

                                                                                                                                                                                                                                  QueueListOption represents the option of queue list command

                                                                                                                                                                                                                                  type RestartOption

                                                                                                                                                                                                                                  type RestartOption struct {
                                                                                                                                                                                                                                  	Safe bool

                                                                                                                                                                                                                                    RestartOption holds the options for restart cmd

                                                                                                                                                                                                                                    type RootOptions

                                                                                                                                                                                                                                    type RootOptions struct {
                                                                                                                                                                                                                                    	ConfigFile string
                                                                                                                                                                                                                                    	ConfigLoad bool
                                                                                                                                                                                                                                    	Jenkins    string
                                                                                                                                                                                                                                    	Debug      bool
                                                                                                                                                                                                                                    	URL                string
                                                                                                                                                                                                                                    	Username           string
                                                                                                                                                                                                                                    	Token              string
                                                                                                                                                                                                                                    	InsecureSkipVerify string
                                                                                                                                                                                                                                    	Proxy              string
                                                                                                                                                                                                                                    	ProxyAuth          string
                                                                                                                                                                                                                                    	ProxyDisable       bool
                                                                                                                                                                                                                                    	Timeout            int64
                                                                                                                                                                                                                                    	Doctor    bool
                                                                                                                                                                                                                                    	StartTime time.Time
                                                                                                                                                                                                                                    	EndTime   time.Time
                                                                                                                                                                                                                                    	CommonOption *common.Option
                                                                                                                                                                                                                                    	LoggerLevel string

                                                                                                                                                                                                                                      RootOptions is a global option for whole cli

                                                                                                                                                                                                                                      func GetRootOptions

                                                                                                                                                                                                                                      func GetRootOptions() *RootOptions

                                                                                                                                                                                                                                        GetRootOptions returns the root options

                                                                                                                                                                                                                                        func (*RootOptions) GetCurrentJenkinsAndClient

                                                                                                                                                                                                                                        func (o *RootOptions) GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) *appCfg.JenkinsServer

                                                                                                                                                                                                                                          GetCurrentJenkinsAndClient returns the current Jenkins

                                                                                                                                                                                                                                          func (*RootOptions) GetCurrentJenkinsFromOptions

                                                                                                                                                                                                                                          func (o *RootOptions) GetCurrentJenkinsFromOptions() *appCfg.JenkinsServer

                                                                                                                                                                                                                                            GetCurrentJenkinsFromOptions returns the current Jenkins

                                                                                                                                                                                                                                            func (*RootOptions) GetGitHubClient

                                                                                                                                                                                                                                            func (o *RootOptions) GetGitHubClient() *github.Client

                                                                                                                                                                                                                                              GetGitHubClient returns the GitHub client

                                                                                                                                                                                                                                              func (*RootOptions) GetMirror

                                                                                                                                                                                                                                              func (o *RootOptions) GetMirror(name string) string

                                                                                                                                                                                                                                                GetMirror returns the mirror

                                                                                                                                                                                                                                                func (*RootOptions) RunDiagnose

                                                                                                                                                                                                                                                func (o *RootOptions) RunDiagnose(cmd *cobra.Command) (err error)

                                                                                                                                                                                                                                                  RunDiagnose run the diagnose for a specific command

                                                                                                                                                                                                                                                  func (*RootOptions) SetGitHubClient

                                                                                                                                                                                                                                                  func (o *RootOptions) SetGitHubClient(gitHubClient *github.Client)

                                                                                                                                                                                                                                                    SetGitHubClient set the GitHub client

                                                                                                                                                                                                                                                    type RunnerOption

                                                                                                                                                                                                                                                    type RunnerOption struct {
                                                                                                                                                                                                                                                    	RoundTripper http.RoundTripper
                                                                                                                                                                                                                                                    	Safe            bool
                                                                                                                                                                                                                                                    	WarVersion      string
                                                                                                                                                                                                                                                    	WarPath         string
                                                                                                                                                                                                                                                    	PluginPath      string
                                                                                                                                                                                                                                                    	JenkinsfilePath string
                                                                                                                                                                                                                                                    	JfrVersion      string
                                                                                                                                                                                                                                                    	LTS             bool

                                                                                                                                                                                                                                                      RunnerOption is the wrapper of jenkinsfile runner cli

                                                                                                                                                                                                                                                      type ShellOptions

                                                                                                                                                                                                                                                      type ShellOptions struct {
                                                                                                                                                                                                                                                      	TmpDir            string
                                                                                                                                                                                                                                                      	TmpConfigFileName string

                                                                                                                                                                                                                                                        ShellOptions is the option of shell command

                                                                                                                                                                                                                                                        type ShutdownOption

                                                                                                                                                                                                                                                        type ShutdownOption struct {
                                                                                                                                                                                                                                                        	RootOptions *RootOptions
                                                                                                                                                                                                                                                        	Safe          bool
                                                                                                                                                                                                                                                        	Prepare       bool
                                                                                                                                                                                                                                                        	CancelPrepare bool

                                                                                                                                                                                                                                                          ShutdownOption holds the options for shutdown cmd

                                                                                                                                                                                                                                                          type UserCreateOption

                                                                                                                                                                                                                                                          type UserCreateOption struct {
                                                                                                                                                                                                                                                          	RoundTripper http.RoundTripper

                                                                                                                                                                                                                                                            UserCreateOption is user create cmd option

                                                                                                                                                                                                                                                            type UserDeleteOption

                                                                                                                                                                                                                                                            type UserDeleteOption struct {
                                                                                                                                                                                                                                                            	RoundTripper http.RoundTripper

                                                                                                                                                                                                                                                              UserDeleteOption is user delete cmd option

                                                                                                                                                                                                                                                              type UserEditOption

                                                                                                                                                                                                                                                              type UserEditOption struct {
                                                                                                                                                                                                                                                              	Description string

                                                                                                                                                                                                                                                                UserEditOption is the user edit cmd option

                                                                                                                                                                                                                                                                type UserOption

                                                                                                                                                                                                                                                                type UserOption struct {
                                                                                                                                                                                                                                                                	RoundTripper http.RoundTripper

                                                                                                                                                                                                                                                                  UserOption is the user cmd option

                                                                                                                                                                                                                                                                  type UserTokenOption

                                                                                                                                                                                                                                                                  type UserTokenOption struct {
                                                                                                                                                                                                                                                                  	Generate   bool
                                                                                                                                                                                                                                                                  	Name       string
                                                                                                                                                                                                                                                                  	TargetUser string
                                                                                                                                                                                                                                                                  	RoundTripper http.RoundTripper

                                                                                                                                                                                                                                                                    UserTokenOption represents a user token cmd option


                                                                                                                                                                                                                                                                    Path Synopsis