Documentation ¶
Index ¶
- Constants
- Variables
- func Execute()
- func GetCategories(jclient *client.JobClient) (typeMap map[string]string, types []string, err error)
- func GetComputerClient(option common.CommonOption) (*client.ComputerClient, *JenkinsServer)
- func GetConfigFromHome() (configPath string, homeErr error)
- func NewConfigPluginFetchCmd() (cmd *cobra.Command)
- func NewConfigPluginInstallCmd() (cmd *cobra.Command)
- func NewConfigPluginListCmd() (cmd *cobra.Command)
- func RenderTemplate(path string, values map[string]string) (result string, err error)
- func ResetJobBuildOption()
- type CASCApplyOption
- type CASCExportOption
- type CASCOpenOption
- type CASCOptions
- type CASCReloadOption
- type CASCSchemaOption
- type CWPOptions
- type CenterDownloadOption
- type CenterIdentityOption
- type CenterMirrorOption
- type CenterOption
- type CenterStartOption
- type CenterUpgradeOption
- type CenterWatchOption
- type CheckResult
- type CompletionOptions
- type ComputerCreateOption
- type ComputerDeleteOption
- type ComputerLaunchOption
- type ComputerListOption
- type ComputerLogOption
- type ConfigAddOptions
- type ConfigCleanOption
- type ConfigEditOption
- type ConfigGenerateOption
- type ConfigListOption
- type ConfigOptions
- type ConfigSelectOptions
- type CredentialCreateOption
- type CredentialDeleteOption
- type CredentialListOption
- type CrumbIssuerOptions
- type DocOption
- 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 MavenMetadata
- type MavenVersioning
- type OpenOption
- type PluginBuildOptions
- type PluginCheckoutOption
- type PluginCreateOptions
- type PluginDownloadOption
- type PluginInstallOption
- type PluginListOption
- type PluginOpenOption
- type PluginOptions
- type PluginReleaseOptions
- type PluginSearchOption
- type PluginTreadOption
- type PluginUninstallOption
- type PluginUpgradeOption
- type PluginUploadOption
- type QueueCancelOption
- type QueueListOption
- type RestartOption
- type RootOptions
- type ShellOptions
- type UserCreateOption
- type UserDeleteOption
- type UserEditOption
- type UserOption
- type UserTokenOption
- type VersionOption
Constants ¶
const ( // DocTypeMarkdown represents markdown type of doc DocTypeMarkdown string = "Markdown" // DocTypeManPage represents man page type of doc DocTypeManPage string = "ManPage" )
Variables ¶
var ShellTypes = []string{
"zsh", "bash", "powerShell",
}
ShellTypes contains all types of shell
Functions ¶
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
func GetComputerClient(option common.CommonOption) (*client.ComputerClient, *JenkinsServer)
GetComputerClient returns the client of computer
func GetConfigFromHome ¶ added in v0.0.23
GetConfigFromHome returns the config file path from user home dir
func NewConfigPluginFetchCmd ¶ added in v0.0.28
NewConfigPluginFetchCmd create a command for fetching plugin metadata
func NewConfigPluginInstallCmd ¶ added in v0.0.28
NewConfigPluginInstallCmd create a command for fetching plugin metadata
func NewConfigPluginListCmd ¶ added in v0.0.28
NewConfigPluginListCmd create a command for list all jcli plugins
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
Types ¶
type CASCApplyOption ¶ added in v0.0.24
type CASCApplyOption struct {
RoundTripper http.RoundTripper
}
CASCApplyOption as the options of apply configuration as code
type CASCExportOption ¶ added in v0.0.24
type CASCExportOption struct {
RoundTripper http.RoundTripper
}
CASCExportOption as the options of reload configuration as code
type CASCOpenOption ¶ added in v0.0.24
type CASCOpenOption struct { ExecContext util.ExecContext Browser string }
CASCOpenOption is the option of casc open cmd
type CASCOptions ¶ added in v0.0.24
type CASCOptions struct {
common.CommonOption
}
CASCOptions is the option of casc
func (*CASCOptions) Check ¶ added in v0.0.24
func (o *CASCOptions) Check() (err error)
Check do the health check of casc cmd
type CASCReloadOption ¶ added in v0.0.24
type CASCReloadOption struct {
RoundTripper http.RoundTripper
}
CASCReloadOption as the options of reload configuration as code
type CASCSchemaOption ¶ added in v0.0.24
type CASCSchemaOption struct {
RoundTripper http.RoundTripper
}
CASCSchemaOption as the options of reload configuration as code
type CWPOptions ¶ added in v0.0.27
type CWPOptions struct { common.CommonOption ConfigPath string Version string TmpDir string Environment string BomPath string MvnSettingsFile string BatchMode bool Demo bool InstallArtifacts bool ShowProgress bool MetadataURL string LocalCache string 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
type CenterDownloadOption ¶ added in v0.0.20
type CenterDownloadOption struct { LTS bool Mirror string Version string Output string ShowProgress bool Formula string 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
type CenterIdentityOption struct {
common.CommonOption
}
CenterIdentityOption 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.CommonOption Port int Context string SetupWizard bool AdminCanGenerateNewTokens bool // comes from folder plugin ConcurrentIndexing int Admin string HTTPSEnable bool HTTPSPort int HTTPSCertificate string HTTPSPrivateKey string Environments []string System []string Download bool Version string LTS bool Formula string RandomWebDir bool 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.CommonOption common.OutputOption }
ComputerCreateOption option for config list command
type ComputerDeleteOption ¶ added in v0.0.24
type ComputerDeleteOption struct {
common.CommonOption
}
ComputerDeleteOption option for agent delete command
type ComputerLaunchOption ¶ added in v0.0.24
type ComputerLaunchOption struct { common.CommonOption Type string ShowProgress bool /** share info between inner functions */ ComputerClient *client.ComputerClient CurrentJenkins *JenkinsServer Output string }
ComputerLaunchOption option for config list command
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.CommonOption common.OutputOption }
ComputerListOption option for config list command
type ComputerLogOption ¶ added in v0.0.24
type ComputerLogOption struct {
common.CommonOption
}
ComputerLogOption option for config list command
type ConfigAddOptions ¶ added in v0.0.10
type ConfigAddOptions struct {
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 ConfigEditOption ¶ added in v0.0.25
type ConfigEditOption struct {
common.CommonOption
}
ConfigEditOption is the option for edit config command
type ConfigGenerateOption ¶ added in v0.0.18
type ConfigGenerateOption struct { common.InteractiveOption common.CommonOption 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 { common.OutputOption Config string }
ConfigListOption option for config list command
type ConfigOptions ¶ added in v0.0.9
type ConfigOptions struct { common.CommonOption ConfigFileLocation string Detail bool }
ConfigOptions is the config cmd option
type ConfigSelectOptions ¶ added in v0.0.25
type ConfigSelectOptions struct {
common.CommonOption
}
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 { common.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 JobArtifactDownloadOption ¶ added in v0.0.21
type JobArtifactDownloadOption struct { ID string ShowProgress bool DownloadDir string Jenkins *JenkinsServer RoundTripper http.RoundTripper }
JobArtifactDownloadOption is the options of job artifact download command
type JobArtifactOption ¶ added in v0.0.21
type JobArtifactOption struct { common.OutputOption common.CommonOption }
JobArtifactOption is the options of job artifact command
type JobBuildOption ¶ added in v0.0.18
type JobBuildOption struct { common.BatchOption common.CommonOption Param string ParamArray []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.CommonOption }
JobDeleteOption is the job delete option
type JobDisableOption ¶ added in v0.0.27
type JobDisableOption struct { common.BatchOption common.CommonOption }
JobDisableOption is the job delete option
type JobEditOption ¶ added in v0.0.23
type JobEditOption struct { common.CommonOption Filename string Script string URL string Sample bool TrimSpace bool }
JobEditOption is the option for job create command
type JobEnableOption ¶ added in v0.0.27
type JobEnableOption struct { common.BatchOption common.CommonOption }
JobEnableOption is the job delete option
type JobHistoryOption ¶ added in v0.0.18
type JobHistoryOption struct { common.OutputOption 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 RoundTripper http.RoundTripper }
JobLogOption is the job log option
type JobOption ¶ added in v0.0.10
type JobOption struct {
common.OutputOption
}
JobOption is the job cmd option
type JobParamOption ¶ added in v0.0.18
type JobParamOption struct { common.OutputOption Indent bool RoundTripper http.RoundTripper }
JobParamOption is the job param option
type JobSearchOption ¶ added in v0.0.10
type JobSearchOption struct { common.CommonOption common.OutputOption Name string Type string Parent string Start int Limit int }
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.CommonOption }
JobStopOption is the job stop option
type JobTypeOption ¶ added in v0.0.18
type JobTypeOption struct { common.OutputOption common.CommonOption }
JobTypeOption is the job type cmd option
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 OpenOption ¶ added in v0.0.10
type OpenOption struct { common.CommonOption common.InteractiveOption Browser string Config bool }
OpenOption is the open cmd option
type PluginBuildOptions ¶ added in v0.0.27
type PluginBuildOptions struct { common.CommonOption DebugOutput bool }
PluginBuildOptions for the plugin build command
type PluginCheckoutOption ¶ added in v0.0.23
type PluginCheckoutOption struct {
RoundTripper http.RoundTripper
}
PluginCheckoutOption is the option for plugin checkout command
type PluginCreateOptions ¶ added in v0.0.23
type PluginCreateOptions struct { common.CommonOption DebugOutput bool }
PluginCreateOptions for the plugin create command
type PluginDownloadOption ¶ added in v0.0.23
type PluginDownloadOption struct { SkipDependency bool SkipOptional bool UseMirror bool ShowProgress bool DownloadDir string RoundTripper http.RoundTripper }
PluginDownloadOption is the option for plugin download command
type PluginInstallOption ¶ added in v0.0.23
type PluginInstallOption struct { UseMirror bool ShowProgress bool RoundTripper http.RoundTripper }
PluginInstallOption is the option for plugin install
type PluginListOption ¶ added in v0.0.18
type PluginListOption struct { common.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 ¶
type PluginOptions struct { common.CommonOption Suite string }
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.CommonOption Batch bool Prepare bool Perform bool SkipTests bool DebugOutput bool }
PluginReleaseOptions for the plugin create command
type PluginSearchOption ¶ added in v0.0.18
type PluginSearchOption struct { common.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 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)
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 { common.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.CommonOption 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 bool Proxy string ProxyAuth string ProxyDisable bool Doctor bool LoggerLevel string }
RootOptions is a global option for whole cli
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
type ShellOptions ¶ added in v0.0.24
type ShellOptions struct { common.CommonOption TmpDir string TmpConfigFileName string }
ShellOptions is the option of shell command
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
type UserEditOption struct { common.CommonOption Description string }
UserEditOption is the user edit cmd option
type UserOption ¶ added in v0.0.18
type UserOption struct { common.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 ¶
- casc.go
- casc_apply.go
- casc_export.go
- casc_open.go
- casc_reload.go
- casc_schema.go
- center.go
- center_download.go
- center_identity.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_edit.go
- config_generate.go
- config_list.go
- config_plugin.go
- config_remove.go
- config_select.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_input.go
- job_log.go
- job_param.go
- job_search.go
- job_stop.go
- job_type.go
- open.go
- plugin.go
- plugin_build.go
- plugin_check.go
- plugin_create.go
- plugin_download.go
- plugin_install.go
- plugin_list.go
- plugin_open.go
- plugin_release.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
- shell.go
- user.go
- user_create.go
- user_delete.go
- user_edit.go
- user_token.go
- version.go