Documentation ¶
Index ¶
- type CLI
- func (cli *CLI) Agents(ctx *cli.Context)
- func (cli *CLI) Artifact(ctx *cli.Context)
- func (cli *CLI) Build(ctx *cli.Context)
- func (cli *CLI) Clean(ctx *cli.Context)
- func (cli *CLI) Health(ctx *cli.Context)
- func (cli *CLI) Init(ctx *cli.Context)
- func (cli *CLI) Login(ctx *cli.Context)
- func (cli *CLI) Personal(ctx *cli.Context)
- func (cli *CLI) Projects(ctx *cli.Context)
- func (cli *CLI) Run(args []string)
- func (cli *CLI) Stages(ctx *cli.Context)
- func (cli *CLI) Status(ctx *cli.Context)
- func (cli *CLI) Trigger(ctx *cli.Context)
- func (cli *CLI) Wait(ctx *cli.Context)
- type Creds
- type CredsStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct { // Client is used to communicate with a Pulse server. Client func(url, user, pass string) (pulse.Client, error) // Dev TODO(rjeczalik): document Dev func(c pulse.Client, url, user, pass string) (dev.Tool, error) // Out terminates the application, writing to os.Stdout and calling os.Exit(0) Out func(...interface{}) // Err terminates the application, writing to os.Stdout and calling os.Exit(1) Err func(...interface{}) // Store is used to persist authorization information. Store CredsStore // contains filtered or unexported fields }
CLI is a facade that implements cmd/pulsecli tool.
func New ¶
func New() *CLI
New gives a new CLI, sets up command line handling and registers subcommands.
func (*CLI) Agents ¶
Agents is a command line interface to a Agents method of a pulse.Client. It prints hostname-agentname pairs one per line for every agent. It tries to extract the hostname from every agent's URL.
func (*CLI) Artifact ¶
Artifact is a a command line interface to Artifact method of a pulse.Client. It downloads all artifacts captured from given project and build number
func (*CLI) Clean ¶
Clean is a command line interface o a Clear method of a pulse.Client. It triggers a working directory cleanup for each project requested.
func (*CLI) Health ¶
Health checks a status of a Pulse server or a project. Pulse server health check fails when at least one agent is offline (meaning that pulse-agent on that machine has died or communication went down) or at least half of the agents are in synchronization state, which means Pulse server has deadlocked because of whatever reasons (the most favorite is DNS handling, apparently it is possible for a DNS request to not time out, which makes all Pulse worker threads just stuck). A project health check requests error and warning messages for latest build of a given project, and fails when the list is not empty.
func (*CLI) Init ¶
Init is a a command line interface to Init method of a pulse.Client. It outputs a pair of boolean and name, one per line for every project requested, separated by a tab. Boolean value indicates whether initialization request was accepted of rejected by Pulse server.
func (*CLI) Login ¶
Login writes Pulse Remote API authentication information to a ~/.pulsecli file in a YAML format. On consecutive runs it updates every non-empty field that is passed from command line. It fails in doing so, when given credentials are not valid.
func (*CLI) Projects ¶
Projects is a command line interface to a Projects method of a pulse.Client. It outputs a name for every project, one per line.
func (*CLI) Stages ¶
Stages is a command line interface to a Stages method of a pulse.Client. It outputs names one per line and expectes an exact project name to be passed through command line, not a regex.
func (*CLI) Status ¶
Status is a command line interface to a BuildResult methos of a pulse.Client. It outputs []BuildResult for every requested project in an YAML format.