Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExportCmd = &cobra.Command{ Use: "export <pipeline name>", Short: "Exports the specified pipeline as a config-repo definition in the indicated config-repo plugin format", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { export.Run(args) }, }
View Source
var FetchCmd = &cobra.Command{ Use: "fetch", Short: "Fetches configrepo plugins", Run: func(cmd *cobra.Command, args []string) { fetch.Run(args) }, }
View Source
var PluginDir string
View Source
var PluginId string
View Source
var PluginJar string
View Source
var PreflightCmd = &cobra.Command{ Use: "preflight <file> [<file2>, ...]", Short: "Preflights any number of definition files for syntax, structure, and dependencies against a running GoCD server", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { preflight.Run(args) }, }
View Source
var RmCmd = &cobra.Command{ Use: "rm id", Short: "Deletes a config-repo by id", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { rm.Run(args) }, }
View Source
var RootCmd = &cobra.Command{ Use: "configrepo", Aliases: []string{"cr"}, Short: "GoCD config-repo functions", Long: `Functions to help development of config-repos in GoCD (pipeline configs as code)`, ValidArgs: []string{"show", "rm", "syntax", "fetch", "preflight", "help"}, }
RootCmd represents the configrepo command
View Source
var ShowCmd = &cobra.Command{ Use: "show id", Short: "Displays the settings for an existing config-repo", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { show.Run(args) }, }
View Source
var SyntaxCmd = &cobra.Command{ Use: "syntax <file> [<file2>, ...]", Short: "Checks one or more definition files for syntactical correctness", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { syntax.Run(args) }, }
Functions ¶
func ParseCrPreflight ¶
func ParseCrPreflight(body []byte) (*api.CrPreflightResponse, error)
Types ¶
type ExportRunner ¶
type ExportRunner struct {
UseStdout bool
}
func (*ExportRunner) Run ¶
func (er *ExportRunner) Run(args []string)
type FetchRunner ¶
func (*FetchRunner) FetchPlugin ¶
func (fr *FetchRunner) FetchPlugin(id string) (string, error)
func (*FetchRunner) GetReleaseUrl ¶
func (fr *FetchRunner) GetReleaseUrl(pluginId string) (string, error)
func (*FetchRunner) Run ¶
func (fr *FetchRunner) Run(args []string)
type PreflightRunner ¶
type PreflightRunner struct {
RepoId string
}
func (*PreflightRunner) Run ¶
func (pr *PreflightRunner) Run(args []string)
type ShowRunner ¶
type ShowRunner struct{}
func (*ShowRunner) Run ¶
func (r *ShowRunner) Run(args []string)
type SyntaxRunner ¶
type SyntaxRunner struct {
Raw bool
}
func (*SyntaxRunner) FindOrDownloadPluginJar ¶
func (sr *SyntaxRunner) FindOrDownloadPluginJar()
func (*SyntaxRunner) Run ¶
func (sr *SyntaxRunner) Run(args []string)
Click to show internal directories.
Click to hide internal directories.