Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddCmd = cli.Command{ Name: "deployment", Description: "Use this command to add a deployment.", Usage: "Add a deployment", Action: add, Before: validate, Flags: []cli.Flag{ &cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVars: []string{"VELA_ORG"}, }, &cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained with the organization", EnvVars: []string{"VELA_REPO"}, }, &cli.StringFlag{ Name: "ref", Usage: "Provide the reference to deploy - this can be a branch, commit (SHA) or tag", EnvVars: []string{"VELA_REF"}, Value: "master", }, &cli.StringFlag{ Name: "target", Usage: "Provide the name for the target deployment environment", EnvVars: []string{"VELA_TARGET"}, Value: "production", }, &cli.StringFlag{ Name: "description", Usage: "Provide the description for the deployment", EnvVars: []string{"VELA_DESCRIPTION"}, }, &cli.StringFlag{ Name: "task", Usage: "Provide the task for the deployment", EnvVars: []string{"VELA_TASK"}, }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Add a deployment for a repository. $ {{.HelpName}} --org github --repo octocat 2. Add a deployment with a specific target environment. $ {{.HelpName}} --org github --repo octocat --target stage 3. Add a deployment with a specific branch reference. $ {{.HelpName}} --org github --repo octocat --ref dev 4. Add a deployment with a specific commit reference. $ {{.HelpName}} --org github --repo octocat --ref 48afb5bdc41ad69bf22588491333f7cf71135163 4. Add a deployment with a specific description. $ {{.HelpName}} --org github --repo octocat --description 'my custom message' `, cli.CommandHelpTemplate), }
AddCmd defines the command for adding a repository.
View Source
var GetCmd = cli.Command{ Name: "deployment", Aliases: []string{"deployments"}, Description: "Use this command to get a list of deployments.", Usage: "Display a list of deployments", Action: get, Before: validate, Flags: []cli.Flag{ &cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVars: []string{"VELA_ORG"}, }, &cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained within the organization", EnvVars: []string{"VELA_REPO"}, }, &cli.IntFlag{ Name: "page", Aliases: []string{"p"}, Usage: "Print a specific page of deployments", Value: 1, }, &cli.IntFlag{ Name: "per-page", Aliases: []string{"pp"}, Usage: "Expand the number of items contained within page", Value: 10, }, &cli.StringFlag{ Name: "output", Aliases: []string{"o"}, Usage: "Print the output in wide, yaml or json format", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Get deployments for a repository. $ {{.HelpName}} --org github --repo octocat 2. Get deployments for a repository with wide view output. $ {{.HelpName}} --org github --repo octocat --output wide 3. Get deployments for a repository with yaml output. $ {{.HelpName}} --org github --repo octocat --output yaml 4. Get deployments for a repository with json output. $ {{.HelpName}} --org github --repo octocat --output json 5. Get deployments for a repository when org and repo config or environment variables are set. $ {{.HelpName}} `, cli.CommandHelpTemplate), }
GetCmd defines the command for getting a list of deployments.
View Source
var ViewCmd = cli.Command{ Name: "deployment", Description: "Use this command to view a deployment.", Usage: "View details of the provided deployment", Action: view, Before: validate, Flags: []cli.Flag{ &cli.StringFlag{ Name: "org", Usage: "Provide the organization for the repository", EnvVars: []string{"VELA_ORG"}, }, &cli.StringFlag{ Name: "repo", Usage: "Provide the repository contained within the organization", EnvVars: []string{"VELA_REPO"}, }, &cli.IntFlag{ Name: "deployment", Aliases: []string{"number", "d"}, Usage: "Provide the deployment number", EnvVars: []string{"VELA_DEPLOYMENT"}, }, &cli.StringFlag{ Name: "output", Aliases: []string{"o"}, Usage: "Print the output in json format", }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. View deployment details for a repository. $ {{.HelpName}} --org github --repo octocat --deployment 1 2. View deployment details for a repository with json output. $ {{.HelpName}} --org github --repo octocat --deployment --output json 3. View deployment details for a repository when org and repo config or environment variables are set. $ {{.HelpName}} --deployment 1 `, cli.CommandHelpTemplate), }
ViewCmd defines the command for viewing a deployment.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.