Help us shape the future of Go! Take the 2026 Go Developer Survey

step

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package step provides the defined step CLI commands for Vela.

Usage:

import "github.com/go-vela/cli/command/step"

Index

Constants

This section is empty.

Variables

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

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_ORG", "STEP_ORG"),
			Name:    internal.FlagOrg,
			Aliases: []string{"o"},
			Usage:   "provide the organization for the step",
		},
		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_REPO", "STEP_REPO"),
			Name:    internal.FlagRepo,
			Aliases: []string{"r"},
			Usage:   "provide the repository for the step",
		},

		&cli.Int64Flag{
			Sources: cli.EnvVars("VELA_BUILD", "STEP_BUILD"),
			Name:    internal.FlagBuild,
			Aliases: []string{"b"},
			Usage:   "provide the build for the step",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "STEP_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew, wide or yaml",
		},

		&cli.IntFlag{
			Sources: cli.EnvVars("VELA_PAGE"),
			Name:    internal.FlagPage,
			Aliases: []string{"p"},
			Usage:   "print a specific page of steps",
			Value:   1,
		},
		&cli.IntFlag{
			Sources: cli.EnvVars("VELA_PER_PAGE"),
			Name:    internal.FlagPerPage,
			Aliases: []string{"pp"},
			Usage:   "number of steps to print per page",
			Value:   10,
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. Get steps for a repository.
    $ {{.FullName}} --org MyOrg --repo MyRepo --build 1
  2. Get steps for a repository with wide view output.
    $ {{.FullName}} --org MyOrg --repo MyRepo --build 1 --output wide
  3. Get steps for a repository with yaml output.
    $ {{.FullName}} --org MyOrg --repo MyRepo --build 1 --output yaml
  4. Get steps for a repository with json output.
    $ {{.FullName}} --org MyOrg --repo MyRepo --build 1 --output json
  5. Get steps for a build when config or environment variables are set.
    $ {{.FullName}} --build 1

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/step/get/
`, cli.CommandHelpTemplate),
}

CommandGet defines the command for capturing a list of steps.

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

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_ORG", "STEP_ORG"),
			Name:    internal.FlagOrg,
			Aliases: []string{"o"},
			Usage:   "provide the organization for the step",
		},
		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_REPO", "STEP_REPO"),
			Name:    internal.FlagRepo,
			Aliases: []string{"r"},
			Usage:   "provide the repository for the step",
		},

		&cli.Int64Flag{
			Sources: cli.EnvVars("VELA_BUILD", "STEP_BUILD"),
			Name:    internal.FlagBuild,
			Aliases: []string{"b"},
			Usage:   "provide the build for the step",
		},

		&cli.Int32Flag{
			Sources: cli.EnvVars("VELA_STEP", "STEP_NUMBER"),
			Name:    internal.FlagStep,
			Aliases: []string{"s", "number", "sn"},
			Usage:   "provide the number for the step",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "STEP_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
			Value:   "yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. View step details for a repository.
    $ {{.FullName}} --org MyOrg --repo MyRepo --build 1 --step 1
  2. View step details for a repository with json output.
    $ {{.FullName}} --org MyOrg --repo MyRepo --build 1 --step 1 --output json
  3. View step details for a repository config or environment variables are set.
    $ {{.FullName}} --build 1 --step 1

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/step/view/
`, cli.CommandHelpTemplate),
}

CommandView defines the command for inspecting 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