Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFileExists(path string) (exist bool, err error)
- func ConvertByte2String(byte []byte, charset string) string
- func ConvertPluginsToArray(plugins []jenkinsFormula.Plugin) (pluginArray []string)
- func Execute()
- func GenerateSampleConfig() ([]byte, error)
- func GetCategories(jclient *client.JobClient) (typeMap map[string]string, types []string, err error)
- func GetComputerClient(option common.Option) (*computer.Client, *appCfg.JenkinsServer)
- func GetConfigFromHome() (configPath string, homeErr error)
- func GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) (jenkins *appCfg.JenkinsServer)
- func GetCurrentJenkinsFromOptions() (jenkinsServer *appCfg.JenkinsServer)
- func GetHealthCheckRegister() *health.CheckRegister
- func GetRootCommand() *cobra.Command
- func NewShutdownCmd(rootOpt *RootOptions) (cmd *cobra.Command)
- func RenderTemplate(filepath string, values map[string]string) (result string, err error)
- func ResetJobBuildOption()
- func SortPlugins(plugins []jenkinsFormula.Plugin) []jenkinsFormula.Plugin
- func ThinBackupAPI(client *client.CoreClient) (err error)
- func ValidAgentNames(cmd *cobra.Command, args []string, prefix string) (agentNames []string, directive cobra.ShellCompDirective)
- func ValidJenkinsAndDataNames(cmd *cobra.Command, args []string, prefix string) (result []string, directive cobra.ShellCompDirective)
- func ValidJenkinsNames(_ *cobra.Command, args []string, prefix string) (jenkinsNames []string, directive cobra.ShellCompDirective)
- type BackupOption
- type CWPOptions
- func (o *CWPOptions) Download() (err error)
- func (o *CWPOptions) GetCWPURL(version string) string
- func (o *CWPOptions) GetLatest() (version string, err error)
- func (o *CWPOptions) Run(cmd *cobra.Command, args []string) (err error)
- func (o *CWPOptions) RunWithoutProcessExits(cmd *cobra.Command, args []string) (err error)
- type CenterDownloadOption
- type CenterIdentityOption
- type CenterListOption
- type CenterLoginOption
- type CenterMirrorOption
- type CenterOption
- type CenterStartOption
- type CenterUpgradeOption
- type CenterWatchOption
- type Channel
- type CheckResult
- type CompletionOptions
- type ComputerCreateOption
- type ComputerDeleteOption
- type ComputerLaunchOption
- type ComputerListOption
- type ComputerLogOption
- type ConfigAddOptions
- type ConfigCleanOption
- type ConfigDataOptions
- type ConfigEditOption
- type ConfigGenerateOption
- type ConfigListOption
- type ConfigOptions
- type ConfigSelectOptions
- type CredentialCreateOption
- type CredentialDeleteOption
- type CredentialListOption
- type CrumbIssuerOptions
- type DocOption
- type Item
- type JNLPAgentImage
- type JobArtifactDownloadOption
- type JobArtifactOption
- type JobBuildOption
- type JobCreateOption
- type JobDeleteOption
- type JobDisableOption
- type JobEditOption
- type JobEnableOption
- type JobHistoryOption
- type JobInputOption
- type JobLogOption
- type JobOption
- type JobParamOption
- type JobSearchOption
- type JobStopOption
- type JobTypeOption
- type LaunchMode
- type MavenMetadata
- type MavenVersioning
- type NewPluginOption
- type OpenOption
- type PluginBuildOptions
- type PluginCheckoutOption
- type PluginCreateOptions
- type PluginDownloadOption
- type PluginFormulaOption
- type PluginInstallOption
- type PluginListOption
- type PluginOpenOption
- type PluginOptions
- type PluginReleaseOptions
- type PluginRunOptions
- type PluginSearchOption
- type PluginTreadOption
- type PluginUninstallOption
- type PluginUpgradeOption
- type PluginUploadOption
- type QueueCancelOption
- type QueueListOption
- type RestartOption
- type RootOptions
- func (o *RootOptions) GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) *appCfg.JenkinsServer
- func (o *RootOptions) GetCurrentJenkinsFromOptions() *appCfg.JenkinsServer
- func (o *RootOptions) GetGitHubClient() *github.Client
- func (o *RootOptions) GetMirror(name string) string
- func (o *RootOptions) RunDiagnose(cmd *cobra.Command) (err error)
- func (o *RootOptions) SetGitHubClient(gitHubClient *github.Client)
- type RunnerOption
- type ShellOptions
- type ShutdownOption
- type UserCreateOption
- type UserDeleteOption
- type UserEditOption
- type UserOption
- type UserTokenOption
Constants ¶
const ( // DocTypeMarkdown represents markdown type of doc DocTypeMarkdown string = "Markdown" // DocTypeManPage represents man page type of doc DocTypeManPage string = "ManPage" )
const ( // UTF8 is the chart set name UTF8 = "UTF-8" // GB18030 is the chart set name GB18030 = "GB18030" )
const ASCIIOfLineFeed = 10
ASCIIOfLineFeed is the ASCII of line feed
const ASCIIOfSpace = 32
ASCIIOfSpace is the ASCII of space
const (
// AgentJNLP is the agent type of jnlp
AgentJNLP = "jnlp"
)
const LtsURL = "https://www.jenkins.io/changelog-stable/rss.xml"
LtsURL is the URL of stable Jenkins RSS
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"
)
const WidthOfDescription = 60
WidthOfDescription is the width of the description column
Variables ¶
var ShellTypes = []string{
"zsh", "bash", "powerShell",
}
ShellTypes contains all types of shell
Functions ¶
func CheckFileExists ¶ added in v0.0.39
CheckFileExists returns true if exits and returns false if not
func ConvertByte2String ¶ added in v0.0.31
ConvertByte2String convert byte to string
func ConvertPluginsToArray ¶ added in v0.0.39
func ConvertPluginsToArray(plugins []jenkinsFormula.Plugin) (pluginArray []string)
ConvertPluginsToArray convert jenkinsFormula.Plugin to slice for the sake of multiple select
func GenerateSampleConfig ¶ added in v0.0.29
GenerateSampleConfig returns a sample config
func GetCategories ¶ added in v0.0.22
func GetCategories(jclient *client.JobClient) ( typeMap map[string]string, types []string, err error)
GetCategories returns the categories of current Jenkins
func GetComputerClient ¶ added in v0.0.24
GetComputerClient returns the client of computer
func GetConfigFromHome ¶ added in v0.0.23
GetConfigFromHome returns the config file path from user home dir
func GetCurrentJenkinsAndClient ¶ added in v0.0.32
func GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) (jenkins *appCfg.JenkinsServer)
GetCurrentJenkinsAndClient returns the client
func GetCurrentJenkinsFromOptions ¶ added in v0.0.32
func GetCurrentJenkinsFromOptions() (jenkinsServer *appCfg.JenkinsServer)
GetCurrentJenkinsFromOptions return the jenkins server
func GetHealthCheckRegister ¶ added in v0.0.32
func GetHealthCheckRegister() *health.CheckRegister
GetHealthCheckRegister return the instance of health check register
func GetRootCommand ¶ added in v0.0.29
GetRootCommand returns the root cmd
func NewShutdownCmd ¶ added in v0.0.29
func NewShutdownCmd(rootOpt *RootOptions) (cmd *cobra.Command)
NewShutdownCmd create the shutdown command
func RenderTemplate ¶ added in v0.0.27
RenderTemplate render a go template to a temporary file
func ResetJobBuildOption ¶ added in v0.0.23
func ResetJobBuildOption()
ResetJobBuildOption give it a clean option struct
func SortPlugins ¶ added in v0.0.31
func SortPlugins(plugins []jenkinsFormula.Plugin) []jenkinsFormula.Plugin
SortPlugins sort the plugins by asc
func ThinBackupAPI ¶ added in v0.0.39
func ThinBackupAPI(client *client.CoreClient) (err error)
ThinBackupAPI requests backupManual api
func ValidAgentNames ¶ added in v0.0.32
func ValidAgentNames(cmd *cobra.Command, args []string, prefix string) (agentNames []string, directive cobra.ShellCompDirective)
ValidAgentNames autocomplete with agent names
func ValidJenkinsAndDataNames ¶ added in v0.0.32
func ValidJenkinsAndDataNames(cmd *cobra.Command, args []string, prefix string) (result []string, directive cobra.ShellCompDirective)
ValidJenkinsAndDataNames autocomplete with Jenkins names
func ValidJenkinsNames ¶ added in v0.0.32
func ValidJenkinsNames(_ *cobra.Command, args []string, prefix string) (jenkinsNames []string, directive cobra.ShellCompDirective)
ValidJenkinsNames autocomplete with Jenkins names
Types ¶
type BackupOption ¶ added in v0.0.39
type BackupOption struct { RoundTripper http.RoundTripper BackupDir string WaitTime int //Check the backup directory if a new full-date directory exists which means backup succeeds, after triggering thinBackup plugin to backup CheckBackup bool }
BackupOption is an option for backup
func (*BackupOption) Backup ¶ added in v0.0.39
func (o *BackupOption) Backup(cmd *cobra.Command, _ []string) (err error)
Backup will trigger thinBackup plugin to make a backup
func (*BackupOption) Check ¶ added in v0.0.39
func (o *BackupOption) Check() (err error)
Check will find out whether Thin Backup Plugin installed or not
type CWPOptions ¶ added in v0.0.27
type CWPOptions struct { common.Option 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 https://github.com/jenkinsci/custom-war-packager
func (*CWPOptions) Download ¶ added in v0.0.27
func (o *CWPOptions) Download() (err error)
Download get the latest cwp from server into local
func (*CWPOptions) GetCWPURL ¶ added in v0.0.27
func (o *CWPOptions) GetCWPURL(version string) string
GetCWPURL returns the download URL of a specific version cwp
func (*CWPOptions) GetLatest ¶ added in v0.0.27
func (o *CWPOptions) GetLatest() (version string, err error)
GetLatest returns the latest of cwp
func (*CWPOptions) Run ¶ added in v0.0.27
func (o *CWPOptions) Run(cmd *cobra.Command, args []string) (err error)
Run is the main logic of cwp cmd
func (*CWPOptions) RunWithoutProcessExits ¶ added in v0.0.39
func (o *CWPOptions) RunWithoutProcessExits(cmd *cobra.Command, args []string) (err error)
RunWithoutProcessExits has the same logic with function Run and the difference between them is that RunWithoutProcessExits uses exec.Command() instead of syscall.Exec() which causes the process to exit without executing code after cwp.Run()
type CenterDownloadOption ¶ added in v0.0.20
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 ¶ added in v0.0.24
func (c *CenterDownloadOption) DownloadJenkins() (err error)
DownloadJenkins download the Jenkins
type CenterIdentityOption ¶ added in v0.0.24
CenterIdentityOption option for upgrade Jenkins
type CenterListOption ¶ added in v0.0.38
type CenterListOption struct {
Channel Channel `xml:"channel"`
}
CenterListOption as options for Jenkins RSS
type CenterLoginOption ¶ added in v0.0.31
type CenterLoginOption struct { common.Option RoundTripper http.RoundTripper }
CenterLoginOption option for upgrade Jenkins
type CenterMirrorOption ¶ added in v0.0.23
type CenterMirrorOption struct { RoundTripper http.RoundTripper Enable bool MirrorURL string }
CenterMirrorOption option for upgrade Jenkins
type CenterOption ¶ added in v0.0.18
type CenterOption struct { common.WatchOption RoundTripper http.RoundTripper CenterStatus string }
CenterOption is the center cmd option
type CenterStartOption ¶ added in v0.0.24
type CenterStartOption struct { common.Option Port int AgentPort int Context string SetupWizard bool AdminCanGenerateNewTokens bool CleanHome bool CrumbExcludeSessionID 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 ¶ added in v0.0.20
type CenterUpgradeOption struct {
RoundTripper http.RoundTripper
}
CenterUpgradeOption option for upgrade Jenkins
type CenterWatchOption ¶ added in v0.0.19
type CenterWatchOption struct { common.WatchOption UtilNeedRestart bool UtilInstallComplete bool RoundTripper http.RoundTripper CeneterStatus string }
CenterWatchOption as the options of watch command
type CheckResult ¶ added in v0.0.28
CheckResult is the result of checking
type CompletionOptions ¶ added in v0.0.25
type CompletionOptions struct {
Type string
}
CompletionOptions is the option of completion command
type ComputerCreateOption ¶ added in v0.0.24
type ComputerCreateOption struct { common.Option cobra_ext.OutputOption }
ComputerCreateOption option for config list command
type ComputerDeleteOption ¶ added in v0.0.24
ComputerDeleteOption option for agent delete command
type ComputerLaunchOption ¶ added in v0.0.24
type ComputerLaunchOption struct { common.Option Type string ShowProgress bool /** share info between inner functions */ ComputerClient *computer.Client 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 ¶ added in v0.0.30
func (o *ComputerLaunchOption) Check() (err error)
Check do the health check of casc cmd
func (*ComputerLaunchOption) Launch ¶ added in v0.0.24
func (o *ComputerLaunchOption) Launch(name string) (err error)
Launch start a normal agent
func (*ComputerLaunchOption) LaunchJnlp ¶ added in v0.0.24
func (o *ComputerLaunchOption) LaunchJnlp(name string) (err error)
LaunchJnlp start a JNLP agent
type ComputerListOption ¶ added in v0.0.24
type ComputerListOption struct { common.Option cobra_ext.OutputOption }
ComputerListOption option for config list command
type ComputerLogOption ¶ added in v0.0.24
ComputerLogOption option for config list command
type ConfigAddOptions ¶ added in v0.0.10
type ConfigAddOptions struct {
appCfg.JenkinsServer
}
ConfigAddOptions is the config ad option
type ConfigCleanOption ¶ added in v0.0.28
ConfigCleanOption option for config list command
func (*ConfigCleanOption) Check ¶ added in v0.0.28
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 ¶ added in v0.0.28
func (o *ConfigCleanOption) CleanByCondition(resultList []CheckResult) (err error)
CleanByCondition do the clean work by conditions
type ConfigDataOptions ¶ added in v0.0.31
ConfigDataOptions is the config data option
type ConfigEditOption ¶ added in v0.0.25
ConfigEditOption is the option for edit config command
type ConfigGenerateOption ¶ added in v0.0.18
type ConfigGenerateOption struct { common.InteractiveOption common.Option common.BatchOption Copy bool }
ConfigGenerateOption is the config generate cmd option
func (*ConfigGenerateOption) InteractiveWithConfig ¶ added in v0.0.25
func (o *ConfigGenerateOption) InteractiveWithConfig(cmd *cobra.Command, data []byte) (err error)
InteractiveWithConfig be friendly for a newer
type ConfigListOption ¶ added in v0.0.23
type ConfigListOption struct { cobra_ext.OutputOption Config string }
ConfigListOption option for config list command
type ConfigOptions ¶ added in v0.0.9
ConfigOptions is the config cmd option
type ConfigSelectOptions ¶ added in v0.0.25
ConfigSelectOptions is the option for select a config
type CredentialCreateOption ¶ added in v0.0.24
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 ¶ added in v0.0.24
type CredentialDeleteOption struct { common.BatchOption ID string Store string RoundTripper http.RoundTripper }
CredentialDeleteOption option for credential delete command
type CredentialListOption ¶ added in v0.0.24
type CredentialListOption struct { cobra_ext.OutputOption 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 ¶ added in v0.0.28
type DocOption struct {
DocType string
}
DocOption is the option for doc generating
type Item ¶ added in v0.0.38
type Item struct { Title string `xml:"title"` Description string `xml:"description"` PubDate string `xml:"pubDate"` }
Item as a option for information of newly-released Jenkins
type JNLPAgentImage ¶ added in v0.0.33
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 ¶ added in v0.0.33
func (i JNLPAgentImage) All() []string
All returns all the supported image list
func (*JNLPAgentImage) Set ¶ added in v0.0.33
func (i *JNLPAgentImage) Set(s string) (err error)
Set give a appropriate value
func (JNLPAgentImage) String ¶ added in v0.0.33
func (i JNLPAgentImage) String() string
String returns the string format of JNLPAgentImage
func (JNLPAgentImage) Type ¶ added in v0.0.33
func (i JNLPAgentImage) Type() string
Type returns the type of current struct
type JobArtifactDownloadOption ¶ added in v0.0.21
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 ¶ added in v0.0.21
type JobArtifactOption struct { cobra_ext.OutputOption common.Option }
JobArtifactOption is the options of job artifact command
type JobBuildOption ¶ added in v0.0.18
type JobBuildOption struct { common.BatchOption common.Option cobra_ext.OutputOption Param string ParamArray []string ParamFilePathArray []string Wait bool WaitTime int Delay int Cause string }
JobBuildOption is the job build option
type JobCreateOption ¶ added in v0.0.18
type JobCreateOption struct { Copy string Type string RoundTripper http.RoundTripper }
JobCreateOption is the job create option
type JobDeleteOption ¶ added in v0.0.18
type JobDeleteOption struct { common.BatchOption common.Option }
JobDeleteOption is the job delete option
type JobDisableOption ¶ added in v0.0.27
type JobDisableOption struct { common.BatchOption common.Option }
JobDisableOption is the job delete option
type JobEditOption ¶ added in v0.0.23
type JobEditOption struct { common.Option 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 ¶ added in v0.0.27
type JobEnableOption struct { common.BatchOption common.Option }
JobEnableOption is the job delete option
type JobHistoryOption ¶ added in v0.0.18
type JobHistoryOption struct { cobra_ext.OutputOption Delete int RoundTripper http.RoundTripper }
JobHistoryOption is the job history option
type JobInputOption ¶ added in v0.0.21
type JobInputOption struct { common.BatchOption Action string RoundTripper http.RoundTripper }
JobInputOption is the job delete option
type JobLogOption ¶ added in v0.0.10
type JobLogOption struct { common.WatchOption History int LogText string LastBuildID int LastBuildURL string NumberOfLines int RoundTripper http.RoundTripper }
JobLogOption is the job log option
type JobOption ¶ added in v0.0.10
type JobOption struct {
cobra_ext.OutputOption
}
JobOption is the job cmd option
type JobParamOption ¶ added in v0.0.18
type JobParamOption struct { cobra_ext.OutputOption Indent bool Remove string Add string RoundTripper http.RoundTripper }
JobParamOption is the job param option
type JobSearchOption ¶ added in v0.0.10
type JobSearchOption struct { common.Option cobra_ext.OutputOption Name string Type string Parent string Start int Limit int Plugin string }
JobSearchOption is the options of job search command
func (*JobSearchOption) Check ¶ added in v0.0.24
func (o *JobSearchOption) Check() (err error)
Check do the conditions check
type JobStopOption ¶ added in v0.0.18
type JobStopOption struct { common.BatchOption common.Option }
JobStopOption is the job stop option
type JobTypeOption ¶ added in v0.0.18
type JobTypeOption struct { cobra_ext.OutputOption common.Option }
JobTypeOption is the job type cmd option
type LaunchMode ¶ added in v0.0.33
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 ¶ added in v0.0.33
func (l LaunchMode) All() []string
All returns all launch modes
func (LaunchMode) Equal ¶ added in v0.0.33
func (l LaunchMode) Equal(mode string) bool
Equal determine if they are same
func (*LaunchMode) Set ¶ added in v0.0.33
func (l *LaunchMode) Set(s string) (err error)
Set give a appropriate value
func (LaunchMode) String ¶ added in v0.0.33
func (l LaunchMode) String() string
String returns the string of the mode
func (LaunchMode) Type ¶ added in v0.0.33
func (l LaunchMode) Type() string
Type returns the type of current struct
type MavenMetadata ¶ added in v0.0.27
type MavenMetadata struct { XMLName xml.Name `xml:"metadata"` Versioning MavenVersioning `xml:"versioning"` }
MavenMetadata is the maven metadata xml root
type MavenVersioning ¶ added in v0.0.27
type MavenVersioning struct { XMLName xml.Name `xml:"versioning"` Latest string `xml:"latest"` Release string `xml:"release"` }
MavenVersioning is the versioning of maven
type NewPluginOption ¶ added in v0.0.39
type NewPluginOption struct { Name string `json:"name"` Version string `json:"gav"` Date string `json:"releaseTimestamp"` RequiredCore string `json:"requiredCore"` }
NewPluginOption consists of four options
type OpenOption ¶ added in v0.0.10
OpenOption is the open cmd option
type PluginBuildOptions ¶ added in v0.0.27
PluginBuildOptions for the plugin build command
type PluginCheckoutOption ¶ added in v0.0.23
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 ¶ added in v0.0.23
PluginCreateOptions for the plugin create command
type PluginDownloadOption ¶ added in v0.0.23
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 ¶ added in v0.0.31
type PluginFormulaOption struct { cobra_ext.OutputOption // 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 ¶ added in v0.0.31
func (o *PluginFormulaOption) Check() (err error)
Check do the health check of plugin formula cmd
type PluginInstallOption ¶ added in v0.0.23
type PluginInstallOption struct { UseMirror bool ShowProgress bool Formula string RoundTripper http.RoundTripper }
PluginInstallOption is the option for plugin install
type PluginListOption ¶ added in v0.0.18
type PluginListOption struct { cobra_ext.OutputOption RoundTripper http.RoundTripper }
PluginListOption option for plugin list command
type PluginOpenOption ¶ added in v0.0.24
type PluginOpenOption struct { ExecContext util.ExecContext Browser string }
PluginOpenOption is the option of plugin open cmd
type PluginOptions ¶
PluginOptions contains the command line options
func (*PluginOptions) FindPlugin ¶ added in v0.0.24
func (o *PluginOptions) FindPlugin(name string) (plugin *client.InstalledPlugin, err error)
FindPlugin find a plugin by name
type PluginReleaseOptions ¶ added in v0.0.24
type PluginReleaseOptions struct { common.Option Batch bool Prepare bool Perform bool SkipTests bool DebugOutput bool }
PluginReleaseOptions for the plugin create command
type PluginRunOptions ¶ added in v0.0.31
PluginRunOptions for the plugin run command
type PluginSearchOption ¶ added in v0.0.18
type PluginSearchOption struct { cobra_ext.OutputOption RoundTripper http.RoundTripper }
PluginSearchOption is the plugin search option
func (*PluginSearchOption) Output ¶ added in v0.0.18
func (o *PluginSearchOption) Output(obj interface{}) (data []byte, err error)
Output output the data into buffer
type PluginTreadOption ¶ added in v0.0.21
type PluginTreadOption struct {
RoundTripper http.RoundTripper
}
PluginTreadOption is the option of plugin trend command
type PluginUninstallOption ¶ added in v0.0.20
type PluginUninstallOption struct {
RoundTripper http.RoundTripper
}
PluginUninstallOption the option of uninstall a plugin
type PluginUpgradeOption ¶ added in v0.0.20
type PluginUpgradeOption struct { Filter []string All bool RoundTripper http.RoundTripper }
PluginUpgradeOption option for plugin list command
type PluginUploadOption ¶ added in v0.0.18
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 common.HookOption // contains filtered or unexported fields }
PluginUploadOption will hold the options of plugin cmd
func (*PluginUploadOption) HPICompletion ¶ added in v0.0.28
func (o *PluginUploadOption) HPICompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
HPICompletion auto find the *.hpi files
type QueueCancelOption ¶ added in v0.0.20
type QueueCancelOption struct {
RoundTripper http.RoundTripper
}
QueueCancelOption represents the option of queue cancel command
type QueueListOption ¶ added in v0.0.20
type QueueListOption struct { cobra_ext.OutputOption RoundTripper http.RoundTripper }
QueueListOption represents the option of queue list command
type RestartOption ¶ added in v0.0.18
type RestartOption struct { common.BatchOption common.Option Safe bool }
RestartOption holds the options for restart cmd
type RootOptions ¶ added in v0.0.9
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 ¶ added in v0.0.29
func GetRootOptions() *RootOptions
GetRootOptions returns the root options
func (*RootOptions) GetCurrentJenkinsAndClient ¶ added in v0.0.30
func (o *RootOptions) GetCurrentJenkinsAndClient(jClient *client.JenkinsCore) *appCfg.JenkinsServer
GetCurrentJenkinsAndClient returns the current Jenkins
func (*RootOptions) GetCurrentJenkinsFromOptions ¶ added in v0.0.30
func (o *RootOptions) GetCurrentJenkinsFromOptions() *appCfg.JenkinsServer
GetCurrentJenkinsFromOptions returns the current Jenkins
func (*RootOptions) GetGitHubClient ¶ added in v0.0.30
func (o *RootOptions) GetGitHubClient() *github.Client
GetGitHubClient returns the GitHub client
func (*RootOptions) GetMirror ¶ added in v0.0.30
func (o *RootOptions) GetMirror(name string) string
GetMirror returns the mirror
func (*RootOptions) RunDiagnose ¶ added in v0.0.24
func (o *RootOptions) RunDiagnose(cmd *cobra.Command) (err error)
RunDiagnose run the diagnose for a specific command
func (*RootOptions) SetGitHubClient ¶ added in v0.0.30
func (o *RootOptions) SetGitHubClient(gitHubClient *github.Client)
SetGitHubClient set the GitHub client
type RunnerOption ¶ added in v0.0.29
type RunnerOption struct { common.BatchOption common.Option 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 ¶ added in v0.0.24
ShellOptions is the option of shell command
type ShutdownOption ¶ added in v0.0.29
type ShutdownOption struct { common.BatchOption common.Option RootOptions *RootOptions Safe bool Prepare bool CancelPrepare bool }
ShutdownOption holds the options for shutdown cmd
type UserCreateOption ¶ added in v0.0.18
type UserCreateOption struct {
RoundTripper http.RoundTripper
}
UserCreateOption is user create cmd option
type UserDeleteOption ¶ added in v0.0.18
type UserDeleteOption struct { common.BatchOption RoundTripper http.RoundTripper }
UserDeleteOption is user delete cmd option
type UserEditOption ¶ added in v0.0.18
UserEditOption is the user edit cmd option
type UserOption ¶ added in v0.0.18
type UserOption struct { cobra_ext.OutputOption RoundTripper http.RoundTripper }
UserOption is the user cmd option
type UserTokenOption ¶ added in v0.0.18
type UserTokenOption struct { Generate bool Name string TargetUser string RoundTripper http.RoundTripper }
UserTokenOption represents a user token cmd option
Source Files ¶
- backup.go
- center.go
- center_download.go
- center_identity.go
- center_jenkinsfile.go
- center_labels.go
- center_list.go
- center_login.go
- center_mirror.go
- center_start.go
- center_upgrade.go
- center_watch.go
- completion.go
- computer.go
- computer_create.go
- computer_delete.go
- computer_launch.go
- computer_list.go
- computer_log.go
- config.go
- config_add.go
- config_clean.go
- config_data.go
- config_edit.go
- config_generate.go
- config_list.go
- config_remove.go
- config_select.go
- config_update.go
- credential.go
- credential_create.go
- credential_delete.go
- credential_list.go
- crumbIssuer.go
- cwp.go
- doc.go
- job.go
- job_artifact.go
- job_artifact_download.go
- job_build.go
- job_create.go
- job_delete.go
- job_disable.go
- job_edit.go
- job_enable.go
- job_history.go
- job_history_edit.go
- job_input.go
- job_log.go
- job_param.go
- job_search.go
- job_stop.go
- job_type.go
- open.go
- plugin.go
- plugin_apitest.go
- plugin_build.go
- plugin_center.go
- plugin_check.go
- plugin_create.go
- plugin_download.go
- plugin_formula.go
- plugin_install.go
- plugin_list.go
- plugin_open.go
- plugin_release.go
- plugin_run.go
- plugin_search.go
- plugin_trend.go
- plugin_uninstall.go
- plugin_upgrade.go
- plugin_upload.go
- queue.go
- queue_cancel.go
- queue_list.go
- restart.go
- root.go
- runner.go
- shell.go
- shutdown.go
- upgrade_labmouse.go
- user.go
- user_create.go
- user_delete.go
- user_edit.go
- user_token.go