commands

package
v4.2.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 47 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingPipelineName = errors.New("Need to specify atleast one pipeline name")
View Source
var ErrShowHelpMessage = errors.New("help command invoked")

Functions

func GetBuild

func GetBuild(client concourse.Client, team concourse.Team, jobName string, buildNameOrID string, pipelineName string) (atc.Build, error)

func GetExpirationFromString

func GetExpirationFromString(token *rc.TargetToken) string

func SliceItoa

func SliceItoa(slice []int) string

func WireTeamConnectors

func WireTeamConnectors(command *flags.Command)

Types

type AbortBuildCommand

type AbortBuildCommand struct {
	Job   flaghelpers.JobFlag `short:"j" long:"job" value-name:"PIPELINE/JOB"   description:"Name of a job to cancel"`
	Build string              `` /* 128-byte string literal not displayed */
}

func (*AbortBuildCommand) Execute

func (command *AbortBuildCommand) Execute([]string) error

type BuildsCommand

type BuildsCommand struct {
	Count    int                      `short:"c" long:"count" default:"50" description:"Number of builds you want to limit the return to"`
	Job      flaghelpers.JobFlag      `short:"j" long:"job" value-name:"PIPELINE/JOB" description:"Name of a job to get builds for"`
	Pipeline flaghelpers.PipelineFlag `short:"p" long:"pipeline" description:"Name of a pipeline to get builds for"`
	Team     bool                     `short:"t"  long:"team" description:"Only show builds for the currently targeted team"`
	Json     bool                     `long:"json" description:"Print command result as JSON"`
}

func (*BuildsCommand) Execute

func (command *BuildsCommand) Execute([]string) error

type CheckResourceCommand

type CheckResourceCommand struct {
	Resource flaghelpers.ResourceFlag `` /* 126-byte string literal not displayed */
	Version  *atc.Version             `` /* 161-byte string literal not displayed */
}

func (*CheckResourceCommand) Execute

func (command *CheckResourceCommand) Execute(args []string) error

type CheckResourceTypeCommand

type CheckResourceTypeCommand struct {
	ResourceType flaghelpers.ResourceFlag `` /* 129-byte string literal not displayed */
}

func (*CheckResourceTypeCommand) Execute

func (command *CheckResourceTypeCommand) Execute(args []string) error

type ChecklistCommand

type ChecklistCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"p" long:"pipeline" required:"true" description:"The pipeline from which to generate the Checkfile"`
}

func (*ChecklistCommand) Execute

func (command *ChecklistCommand) Execute([]string) error

func (*ChecklistCommand) Validate

func (command *ChecklistCommand) Validate() error

type ClearTaskCacheCommand

type ClearTaskCacheCommand struct {
	Job             flaghelpers.JobFlag `short:"j" long:"job"  required:"true"  description:"Job to clear cache from"`
	StepName        string              `short:"s" long:"step"  required:"true" description:"Step name to clear cache from"`
	CachePath       string              `short:"c" long:"cache-path"  default:"" description:"Cache directory to clear out"`
	SkipInteractive bool                `short:"n"  long:"non-interactive"          description:"Destroy the task cache(s) without confirmation"`
}

func (*ClearTaskCacheCommand) Execute

func (command *ClearTaskCacheCommand) Execute([]string) error

type ContainersCommand

type ContainersCommand struct {
	Json bool `long:"json" description:"Print command result as JSON"`
}

func (*ContainersCommand) Execute

func (command *ContainersCommand) Execute([]string) error

type DestroyPipelineCommand

type DestroyPipelineCommand struct {
	Pipeline        flaghelpers.PipelineFlag `short:"p"  long:"pipeline" required:"true" description:"Pipeline to destroy"`
	SkipInteractive bool                     `short:"n"  long:"non-interactive"          description:"Destroy the pipeline without confirmation"`
}

func (*DestroyPipelineCommand) Execute

func (command *DestroyPipelineCommand) Execute(args []string) error

func (*DestroyPipelineCommand) Validate

func (command *DestroyPipelineCommand) Validate() error

type DestroyTeamCommand

type DestroyTeamCommand struct {
	TeamName        string `short:"n" long:"team-name" required:"true"        description:"The team to delete"`
	SkipInteractive bool   `long:"non-interactive"        description:"Force apply configuration"`
}

func (*DestroyTeamCommand) Execute

func (command *DestroyTeamCommand) Execute([]string) error

type ExecuteCommand

type ExecuteCommand struct {
	TaskConfig     atc.PathFlag                 `short:"c" long:"config" required:"true"                description:"The task config to execute"`
	Privileged     bool                         `short:"p" long:"privileged"                            description:"Run the task with full privileges"`
	IncludeIgnored bool                         `` /* 150-byte string literal not displayed */
	Inputs         []flaghelpers.InputPairFlag  `` /* 134-byte string literal not displayed */
	InputsFrom     flaghelpers.JobFlag          `short:"j" long:"inputs-from" value-name:"PIPELINE/JOB" description:"A job to base the inputs on"`
	Outputs        []flaghelpers.OutputPairFlag `` /* 135-byte string literal not displayed */
	Tags           []string                     `` /* 135-byte string literal not displayed */
}

func (*ExecuteCommand) Execute

func (command *ExecuteCommand) Execute(args []string) error

type ExposePipelineCommand

type ExposePipelineCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"p" long:"pipeline" required:"true" description:"Pipeline to expose"`
}

func (*ExposePipelineCommand) Execute

func (command *ExposePipelineCommand) Execute(args []string) error

func (*ExposePipelineCommand) Validate

func (command *ExposePipelineCommand) Validate() error

type FlyCommand

type FlyCommand struct {
	Help HelpCommand `command:"help" description:"Print this help message"`

	Target  rc.TargetName  `short:"t" long:"target" description:"Concourse target name"`
	Targets TargetsCommand `command:"targets" alias:"ts" description:"List saved targets"`

	Version func() `short:"v" long:"version" description:"Print the version of Fly and exit"`

	Verbose bool `long:"verbose" description:"Print API requests and responses"`

	PrintTableHeaders bool `long:"print-table-headers" description:"Print table headers even for redirected output"`

	Login  LoginCommand  `command:"login" alias:"l" description:"Authenticate with the target"`
	Logout LogoutCommand `command:"logout" alias:"o" description:"Release authentication with the target"`
	Status StatusCommand `command:"status" description:"Login status"`
	Sync   SyncCommand   `command:"sync"  alias:"s" description:"Download and replace the current fly from the target"`

	Teams       TeamsCommand       `command:"teams" alias:"t" description:"List the configured teams"`
	SetTeam     SetTeamCommand     `command:"set-team"  alias:"st" description:"Create or modify a team to have the given credentials"`
	RenameTeam  RenameTeamCommand  `command:"rename-team"   alias:"rt" description:"Rename a team"`
	DestroyTeam DestroyTeamCommand `command:"destroy-team"  alias:"dt" description:"Destroy a team and delete all of its data"`

	Checklist ChecklistCommand `command:"checklist" alias:"cl" description:"Print a Checkfile of the given pipeline"`

	Execute ExecuteCommand `command:"execute" alias:"e" description:"Execute a one-off build using local bits"`
	Watch   WatchCommand   `command:"watch"   alias:"w" description:"Stream a build's output"`

	Containers ContainersCommand `command:"containers" alias:"cs" description:"Print the active containers"`
	Hijack     HijackCommand     `command:"hijack"     alias:"intercept" alias:"i" description:"Execute a command in a container"`

	Jobs       JobsCommand       `command:"jobs"      alias:"js" description:"List the jobs in the pipelines"`
	PauseJob   PauseJobCommand   `command:"pause-job" alias:"pj" description:"Pause a job"`
	UnpauseJob UnpauseJobCommand `command:"unpause-job" alias:"uj" description:"Unpause a job"`

	Pipelines         PipelinesCommand         `command:"pipelines"           alias:"ps"   description:"List the configured pipelines"`
	DestroyPipeline   DestroyPipelineCommand   `command:"destroy-pipeline"    alias:"dp"   description:"Destroy a pipeline"`
	GetPipeline       GetPipelineCommand       `command:"get-pipeline"        alias:"gp"   description:"Get a pipeline's current configuration"`
	SetPipeline       SetPipelineCommand       `command:"set-pipeline"        alias:"sp"   description:"Create or update a pipeline's configuration"`
	PausePipeline     PausePipelineCommand     `command:"pause-pipeline"      alias:"pp"   description:"Pause a pipeline"`
	UnpausePipeline   UnpausePipelineCommand   `command:"unpause-pipeline"    alias:"up"   description:"Un-pause a pipeline"`
	ExposePipeline    ExposePipelineCommand    `command:"expose-pipeline"     alias:"ep"   description:"Make a pipeline publicly viewable"`
	HidePipeline      HidePipelineCommand      `command:"hide-pipeline"       alias:"hp"   description:"Hide a pipeline from the public"`
	RenamePipeline    RenamePipelineCommand    `command:"rename-pipeline"     alias:"rp"   description:"Rename a pipeline"`
	ValidatePipeline  ValidatePipelineCommand  `command:"validate-pipeline"   alias:"vp"   description:"Validate a pipeline config"`
	FormatPipeline    FormatPipelineCommand    `command:"format-pipeline"     alias:"fp"   description:"Format a pipeline config"`
	OrderPipelines    OrderPipelinesCommand    `command:"order-pipelines"     alias:"op"   description:"Orders pipelines"`
	CheckResource     CheckResourceCommand     `command:"check-resource"      alias:"cr"   description:"Check a resource"`
	CheckResourceType CheckResourceTypeCommand `command:"check-resource-type" alias:"crt"  description:"Check a resource-type"`
	PauseResource     PauseResourceCommand     `command:"pause-resource"      alias:"pr"   description:"Pause a resource"`
	UnpauseResource   UnpauseResourceCommand   `command:"unpause-resource"    alias:"ur"   description:"Unpause a resource"`

	ClearTaskCache ClearTaskCacheCommand `command:"clear-task-cache" alias:"ctc" description:"Clears cache from a task container"`

	Builds     BuildsCommand     `command:"builds"      alias:"bs" description:"List builds data"`
	AbortBuild AbortBuildCommand `command:"abort-build" alias:"ab" description:"Abort a build"`

	TriggerJob TriggerJobCommand `command:"trigger-job" alias:"tj" description:"Start a job in a pipeline"`

	Volumes VolumesCommand `command:"volumes" alias:"vs" description:"List the active volumes"`

	Workers     WorkersCommand     `command:"workers" alias:"ws" description:"List the registered workers"`
	PruneWorker PruneWorkerCommand `command:"prune-worker" alias:"pw" description:"Prune a stalled, landing, landed, or retiring worker"`
}
var Fly FlyCommand

type FormatPipelineCommand

type FormatPipelineCommand struct {
	Config atc.PathFlag `short:"c" long:"config" required:"true" description:"Pipeline configuration file"`
	Write  bool         `short:"w" long:"write" description:"Do not print to stdout; overwrite the file in place"`
}

func (*FormatPipelineCommand) Execute

func (command *FormatPipelineCommand) Execute(args []string) error

type GetPipelineCommand

type GetPipelineCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"p" long:"pipeline" required:"true" description:"Get configuration of this pipeline"`
	JSON     bool                     `short:"j" long:"json"                     description:"Print config as json instead of yaml"`
}

func (*GetPipelineCommand) Execute

func (command *GetPipelineCommand) Execute(args []string) error

func (*GetPipelineCommand) Validate

func (command *GetPipelineCommand) Validate() error

type HelpCommand

type HelpCommand struct{}

func (*HelpCommand) Execute

func (command *HelpCommand) Execute(args []string) error

type HidePipelineCommand

type HidePipelineCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"p" long:"pipeline" required:"true" description:"Pipeline to hide"`
}

func (*HidePipelineCommand) Execute

func (command *HidePipelineCommand) Execute(args []string) error

func (*HidePipelineCommand) Validate

func (command *HidePipelineCommand) Validate() error

type HijackCommand

type HijackCommand struct {
	Job            flaghelpers.JobFlag      `short:"j" long:"job"   value-name:"PIPELINE/JOB"   description:"Name of a job to hijack"`
	Check          flaghelpers.ResourceFlag `short:"c" long:"check" value-name:"PIPELINE/CHECK" description:"Name of a resource's checking container to hijack"`
	Url            string                   `short:"u" long:"url"                               description:"URL for the build, job, or check container to hijack"`
	Build          string                   `short:"b" long:"build"                             description:"Build number within the job, or global build ID"`
	StepName       string                   `short:"s" long:"step"                              description:"Name of step to hijack (e.g. build, unit, resource name)"`
	Attempt        string                   `short:"a" long:"attempt" value-name:"N[,N,...]"    description:"Attempt number of step to hijack."`
	PositionalArgs struct {
		Command []string `positional-arg-name:"command" description:"The command to run in the container (default: bash)"`
	} `positional-args:"yes"`
}

func (*HijackCommand) Execute

func (command *HijackCommand) Execute([]string) error

type JobsCommand

type JobsCommand struct {
	Pipeline string `short:"p" long:"pipeline" required:"true" description:"Get jobs in this pipeline"`
	Json     bool   `long:"json" description:"Print command result as JSON"`
}

func (*JobsCommand) Execute

func (command *JobsCommand) Execute([]string) error

type LoginCommand

type LoginCommand struct {
	ATCURL      string       `short:"c" long:"concourse-url" description:"Concourse URL to authenticate with"`
	Insecure    bool         `short:"k" long:"insecure" description:"Skip verification of the endpoint's SSL certificate"`
	Username    string       `short:"u" long:"username" description:"Username for basic auth"`
	Password    string       `short:"p" long:"password" description:"Password for basic auth"`
	TeamName    string       `short:"n" long:"team-name" description:"Team to authenticate with"`
	CACert      atc.PathFlag `long:"ca-cert" description:"Path to Concourse PEM-encoded CA certificate file."`
	OpenBrowser bool         `short:"b" long:"open-browser" description:"Open browser to the auth endpoint"`
}

func (*LoginCommand) Execute

func (command *LoginCommand) Execute(args []string) error

type LogoutCommand

type LogoutCommand struct {
	All bool `short:"a" long:"all" description:"Logout of all targets"`
}

func (*LogoutCommand) Execute

func (command *LogoutCommand) Execute(args []string) error

type OrderPipelinesCommand

type OrderPipelinesCommand struct {
	Pipelines []flaghelpers.PipelineFlag `short:"p" long:"pipeline" required:"true" description:"Name of pipeline to order"`
}

func (*OrderPipelinesCommand) Execute

func (command *OrderPipelinesCommand) Execute(args []string) error

func (*OrderPipelinesCommand) Validate

func (command *OrderPipelinesCommand) Validate() ([]string, error)

type PauseJobCommand

type PauseJobCommand struct {
	Job flaghelpers.JobFlag `short:"j" long:"job" required:"true" value-name:"PIPELINE/JOB" description:"Name of a job to pause"`
}

func (*PauseJobCommand) Execute

func (command *PauseJobCommand) Execute(args []string) error

type PausePipelineCommand

type PausePipelineCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"p"  long:"pipeline" required:"true" description:"Pipeline to pause"`
}

func (*PausePipelineCommand) Execute

func (command *PausePipelineCommand) Execute(args []string) error

func (*PausePipelineCommand) Validate

func (command *PausePipelineCommand) Validate() error

type PauseResourceCommand

type PauseResourceCommand struct {
	Resource flaghelpers.ResourceFlag `short:"r" long:"resource" required:"true" value-name:"PIPELINE/RESOURCE" description:"Name of a resource to pause"`
}

func (*PauseResourceCommand) Execute

func (command *PauseResourceCommand) Execute(args []string) error

type PipelinesCommand

type PipelinesCommand struct {
	All  bool `short:"a"  long:"all" description:"Show all pipelines"`
	Json bool `long:"json" description:"Print command result as JSON"`
}

func (*PipelinesCommand) Execute

func (command *PipelinesCommand) Execute([]string) error

type PruneWorkerCommand

type PruneWorkerCommand struct {
	Worker string `short:"w"  long:"worker" required:"true" description:"Worker to prune"`
}

func (*PruneWorkerCommand) Execute

func (command *PruneWorkerCommand) Execute(args []string) error

type RenamePipelineCommand

type RenamePipelineCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"o"  long:"old-name" required:"true"  description:"Pipeline to rename"`
	Name     flaghelpers.PipelineFlag `short:"n"  long:"new-name" required:"true"  description:"Name to set as pipeline name"`
}

func (*RenamePipelineCommand) Execute

func (command *RenamePipelineCommand) Execute([]string) error

func (*RenamePipelineCommand) Validate

func (command *RenamePipelineCommand) Validate() error

type RenameTeamCommand

type RenameTeamCommand struct {
	TeamName    string `short:"o" long:"old-name" required:"true" description:"Current team name"`
	NewTeamName string `short:"n" long:"new-name" required:"true" description:"New team name"`
}

func (*RenameTeamCommand) Execute

func (command *RenameTeamCommand) Execute([]string) error

type SetPipelineCommand

type SetPipelineCommand struct {
	SkipInteractive  bool `short:"n"  long:"non-interactive"               description:"Skips interactions, uses default values"`
	DisableAnsiColor bool `long:"no-color"               description:"Disable color output"`

	CheckCredentials bool `long:"check-creds"  description:"Validate credential variables against credential manager"`

	Pipeline flaghelpers.PipelineFlag `short:"p"  long:"pipeline"  required:"true"  description:"Pipeline to configure"`
	Config   atc.PathFlag             `short:"c"  long:"config"    required:"true"  description:"Pipeline configuration file"`

	Var     []flaghelpers.VariablePairFlag     `` /* 130-byte string literal not displayed */
	YAMLVar []flaghelpers.YAMLVariablePairFlag `` /* 128-byte string literal not displayed */

	VarsFrom []atc.PathFlag `` /* 143-byte string literal not displayed */
}

func (*SetPipelineCommand) Execute

func (command *SetPipelineCommand) Execute(args []string) error

func (*SetPipelineCommand) Validate

func (command *SetPipelineCommand) Validate() error

type SetTeamCommand

type SetTeamCommand struct {
	TeamName        string               `short:"n" long:"team-name" required:"true" description:"The team to create or modify"`
	SkipInteractive bool                 `long:"non-interactive" description:"Force apply configuration"`
	AuthFlags       skycmd.AuthTeamFlags `group:"Authentication"`
}

func (*SetTeamCommand) ErrorAuthNotConfigured

func (command *SetTeamCommand) ErrorAuthNotConfigured()

func (*SetTeamCommand) Execute

func (command *SetTeamCommand) Execute([]string) error

func (*SetTeamCommand) WarnAllowAllUsers

func (command *SetTeamCommand) WarnAllowAllUsers()

type StatusCommand

type StatusCommand struct{}

func (*StatusCommand) Execute

func (c *StatusCommand) Execute([]string) error

type SyncCommand

type SyncCommand struct{}

func (*SyncCommand) Execute

func (command *SyncCommand) Execute(args []string) error

type TargetsCommand

type TargetsCommand struct{}

func (*TargetsCommand) Execute

func (command *TargetsCommand) Execute([]string) error

type TeamsCommand

type TeamsCommand struct {
	Json    bool `long:"json" description:"Print command result as JSON"`
	Details bool `short:"d" long:"details" description:"Print authentication configuration"`
}

func (*TeamsCommand) Execute

func (command *TeamsCommand) Execute([]string) error

type TriggerJobCommand

type TriggerJobCommand struct {
	Job   flaghelpers.JobFlag `short:"j" long:"job" required:"true" value-name:"PIPELINE/JOB" description:"Name of a job to trigger"`
	Watch bool                `short:"w" long:"watch" description:"Start watching the build output"`
}

func (*TriggerJobCommand) Execute

func (command *TriggerJobCommand) Execute(args []string) error

type UnpauseJobCommand

type UnpauseJobCommand struct {
	Job flaghelpers.JobFlag `short:"j" long:"job" required:"true" value-name:"PIPELINE/JOB" description:"Name of a job to unpause"`
}

func (*UnpauseJobCommand) Execute

func (command *UnpauseJobCommand) Execute(args []string) error

type UnpausePipelineCommand

type UnpausePipelineCommand struct {
	Pipeline flaghelpers.PipelineFlag `short:"p" long:"pipeline" required:"true" description:"Pipeline to unpause"`
}

func (*UnpausePipelineCommand) Execute

func (command *UnpausePipelineCommand) Execute(args []string) error

func (*UnpausePipelineCommand) Validate

func (command *UnpausePipelineCommand) Validate() error

type UnpauseResourceCommand

type UnpauseResourceCommand struct {
	Resource flaghelpers.ResourceFlag `short:"r" long:"resource" required:"true" value-name:"PIPELINE/RESOURCE" description:"Name of a resource to unpause"`
}

func (*UnpauseResourceCommand) Execute

func (command *UnpauseResourceCommand) Execute(args []string) error

type ValidatePipelineCommand

type ValidatePipelineCommand struct {
	Config atc.PathFlag `short:"c" long:"config" required:"true"        description:"Pipeline configuration file"`
	Strict bool         `short:"s" long:"strict"                        description:"Fail on warnings"`
	Output bool         `short:"o" long:"output"                        description:"Output templated pipeline to stdout"`

	Var     []flaghelpers.VariablePairFlag     `` /* 130-byte string literal not displayed */
	YAMLVar []flaghelpers.YAMLVariablePairFlag `` /* 128-byte string literal not displayed */

	VarsFrom []atc.PathFlag `` /* 143-byte string literal not displayed */
}

func (*ValidatePipelineCommand) Execute

func (command *ValidatePipelineCommand) Execute(args []string) error

type VolumesCommand

type VolumesCommand struct {
	Details bool `short:"d" long:"details" description:"Print additional information for each volume"`
	Json    bool `long:"json" description:"Print command result as JSON"`
}

func (*VolumesCommand) Execute

func (command *VolumesCommand) Execute([]string) error

type WatchCommand

type WatchCommand struct {
	Job   flaghelpers.JobFlag `short:"j" long:"job"   value-name:"PIPELINE/JOB"   description:"Watches builds of the given job"`
	Build string              `short:"b" long:"build"                               description:"Watches a specific build"`
}

func (*WatchCommand) Execute

func (command *WatchCommand) Execute(args []string) error

type WorkersCommand

type WorkersCommand struct {
	Details bool `short:"d" long:"details" description:"Print additional information for each worker"`
	Json    bool `long:"json" description:"Print command result as JSON"`
}

func (*WorkersCommand) Execute

func (command *WorkersCommand) Execute([]string) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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