Documentation
¶
Overview ¶
Package service provides the defined service CLI commands for Vela.
Usage:
import "github.com/go-vela/cli/command/service"
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandGet = &cli.Command{ Name: internal.FlagService, Aliases: []string{"services"}, Description: "Use this command to get a list of services.", Usage: "Display a list of services", Action: get, Flags: []cli.Flag{ &cli.StringFlag{ EnvVars: []string{"VELA_ORG", "SERVICE_ORG"}, Name: internal.FlagOrg, Aliases: []string{"o"}, Usage: "provide the organization for the build", }, &cli.StringFlag{ EnvVars: []string{"VELA_REPO", "SERVICE_REPO"}, Name: internal.FlagRepo, Aliases: []string{"r"}, Usage: "provide the repository for the build", }, &cli.IntFlag{ EnvVars: []string{"VELA_BUILD", "SERVICE_BUILD"}, Name: internal.FlagBuild, Aliases: []string{"b"}, Usage: "provide the build for the service", }, &cli.StringFlag{ EnvVars: []string{"VELA_OUTPUT", "SERVICE_OUTPUT"}, Name: internal.FlagOutput, Aliases: []string{"op"}, Usage: "format the output in json, spew, wide or yaml", }, &cli.IntFlag{ EnvVars: []string{"VELA_PAGE", "SERVICE_PAGE"}, Name: internal.FlagPage, Aliases: []string{"p"}, Usage: "print a specific page of services", Value: 1, }, &cli.IntFlag{ EnvVars: []string{"VELA_PER_PAGE", "SERVICE_PER_PAGE"}, Name: internal.FlagPerPage, Aliases: []string{"pp"}, Usage: "number of services to print per page", Value: 10, }, }, CustomHelpTemplate: fmt.Sprintf(`%s EXAMPLES: 1. Get services for a repository. $ {{.HelpName}} --org MyOrg --repo MyRepo --build 1 2. Get services for a repository with wide view output. $ {{.HelpName}} --org MyOrg --repo MyRepo --build 1 --output wide 3. Get services for a repository with yaml output. $ {{.HelpName}} --org MyOrg --repo MyRepo --build 1 --output yaml 4. Get services for a repository with json output. $ {{.HelpName}} --org MyOrg --repo MyRepo --build 1 --output json 5. Get services for a build when config or environment variables are set. $ {{.HelpName}} --build 1 DOCUMENTATION: https://go-vela.github.io/docs/reference/cli/service/get/ `, cli.CommandHelpTemplate), }
CommandGet defines the command for capturing a list of services.
View Source
var CommandView = &cli.Command{ Name: internal.FlagService, Description: "Use this command to view a service.", Usage: "View details of the provided service", Action: view, Flags: []cli.Flag{ &cli.StringFlag{ EnvVars: []string{"VELA_ORG", "SERVICE_ORG"}, Name: internal.FlagOrg, Aliases: []string{"o"}, Usage: "provide the organization for the service", }, &cli.StringFlag{ EnvVars: []string{"VELA_REPO", "SERVICE_REPO"}, Name: internal.FlagRepo, Aliases: []string{"r"}, Usage: "provide the repository for the service", }, &cli.IntFlag{ EnvVars: []string{"VELA_BUILD", "SERVICE_BUILD"}, Name: internal.FlagBuild, Aliases: []string{"b"}, Usage: "provide the build for the service", }, &cli.IntFlag{ EnvVars: []string{"VELA_SERVICE", "SERVICE_NUMBER"}, Name: internal.FlagService, Aliases: []string{"s"}, Usage: "provide the number for the service", }, &cli.StringFlag{ EnvVars: []string{"VELA_OUTPUT", "SERVICE_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 service details for a repository. $ {{.HelpName}} --org MyOrg --repo MyRepo --build 1 --service 1 2. View service details for a repository with json output. $ {{.HelpName}} --org MyOrg --repo MyRepo --build 1 --service 1 --output json 3. View service details for a repository when config or environment variables are set. $ {{.HelpName}} --build 1 --service 1 DOCUMENTATION: https://go-vela.github.io/docs/reference/cli/service/view/ `, cli.CommandHelpTemplate), }
CommandView defines the command for inspecting a service.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.