step

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetCmd = cli.Command{
	Name:        "step",
	Aliases:     []string{"steps"},
	Description: "Use this command to get a list of steps.",
	Usage:       "Display a list of steps",
	Action:      get,
	Before:      validate,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Name:    "org",
			Usage:   "Provide the organization for the repository",
			EnvVars: []string{"BUILD_ORG"},
		},
		&cli.StringFlag{
			Name:    "repo",
			Usage:   "Provide the repository contained with the organization",
			EnvVars: []string{"BUILD_REPO"},
		},
		&cli.IntFlag{
			Name:    "build-number",
			Aliases: []string{"build", "b"},
			Usage:   "Provide the build number",
			EnvVars: []string{"BUILD_NUMBER"},
		},

		&cli.IntFlag{
			Name:    "page",
			Aliases: []string{"p"},
			Usage:   "Print a specific page of steps",
			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 steps for a build.
    $ {{.HelpName}} --org github --repo octocat --build-number 1
 2. Get steps for a build with wide view output.
    $ {{.HelpName}} --org github --repo octocat --build-number 1 --output wide
 3. Get steps for a build with yaml output.
    $ {{.HelpName}} --org github --repo octocat --build-number 1 --output yaml
 4. Get steps for a build with json output.
    $ {{.HelpName}} --org github --repo octocat --build-number 1 --output json
 5. Get steps for a build when org and repo config or environment variables are set.
    $ {{.HelpName}} --number 1
`, cli.CommandHelpTemplate),
}

GetCmd defines the command for getting a list of steps.

View Source
var ViewCmd = cli.Command{
	Name:        "step",
	Description: "Use this command to view a step.",
	Usage:       "View details of the provided step",
	Action:      view,
	Before:      validate,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Name:    "org",
			Usage:   "Provide the organization for the repository",
			EnvVars: []string{"BUILD_ORG"},
		},
		&cli.StringFlag{
			Name:    "repo",
			Usage:   "Provide the repository contained with the organization",
			EnvVars: []string{"BUILD_REPO"},
		},
		&cli.IntFlag{
			Name:    "build-number",
			Aliases: []string{"build", "b"},
			Usage:   "Provide the build number",
			EnvVars: []string{"BUILD_NUMBER"},
		},
		&cli.IntFlag{
			Name:    "step-number",
			Aliases: []string{"service", "s"},
			Usage:   "Provide the step number",
			EnvVars: []string{"STEP_NUMBER"},
		},

		&cli.StringFlag{
			Name:    "output",
			Aliases: []string{"o"},
			Usage:   "Print the output in json format",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
 1. Get step details for a repository.
    $ {{.HelpName}} --org github --repo octocat --build-number 1 --step-number 1
 2. Get step details for a repository with json output.
    $ {{.HelpName}} --org github --repo octocat --build-number 1 --step-number 1 --output json
 3. Get step details for a repository when org and repo config or environment variables are set.
    $ {{.HelpName}} --build-number 1 --step-number 1
`, cli.CommandHelpTemplate),
}

ViewCmd defines the command for viewing a step.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL