exec

package
v6.7.3-0...-1f455d7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const AbortedLogMessage = "interrupted"
View Source
const ActionRunSetPipeline = "SetPipeline"
View Source
const TimeoutLogMessage = "timeout exceeded"

Variables

View Source
var ErrPutStepVersionMissing = errors.New("version is missing from put step")

Functions

This section is empty.

Types

type AcrossStep

type AcrossStep struct {
	// contains filtered or unexported fields
}

AcrossStep is a step of steps to run in parallel. It behaves the same as InParallelStep with the exception that an experimental warning is logged to stderr and that step lifecycle build events are emitted (Initializing, Starting, and Finished)

func Across

func Across(
	vars []atc.AcrossVar,
	steps []ScopedStep,
	failFast bool,
	delegateFactory BuildStepDelegateFactory,
	metadata StepMetadata,
) AcrossStep

Across constructs an AcrossStep.

func (AcrossStep) Run

func (step AcrossStep) Run(ctx context.Context, state RunState) (bool, error)

Run calls out to InParallelStep.Run after logging a warning to stderr. It also emits step lifecycle build events (Initializing, Starting, and Finished).

type AggregateStep

type AggregateStep []Step

AggregateStep is a step of steps to run in parallel.

func (AggregateStep) Run

func (step AggregateStep) Run(ctx context.Context, state RunState) (bool, error)

Run executes all steps in parallel. It will indicate that it's ready when all of its steps are ready, and propagate any signal received to all running steps.

It will wait for all steps to exit, even if one step fails or errors. After all steps finish, their errors (if any) will be aggregated and returned as a single error.

type ArtifactInputStep

type ArtifactInputStep struct {
	// contains filtered or unexported fields
}

func (*ArtifactInputStep) Run

func (step *ArtifactInputStep) Run(ctx context.Context, state RunState) (bool, error)

type ArtifactNotFoundError

type ArtifactNotFoundError struct {
	ArtifactName string
}

func (ArtifactNotFoundError) Error

func (e ArtifactNotFoundError) Error() string

type ArtifactOutputStep

type ArtifactOutputStep struct {
	// contains filtered or unexported fields
}

func (*ArtifactOutputStep) Run

func (step *ArtifactOutputStep) Run(ctx context.Context, state RunState) (bool, error)

type ArtifactVolumeNotFoundError

type ArtifactVolumeNotFoundError struct {
	ArtifactName string
}

func (ArtifactVolumeNotFoundError) Error

type BaseResourceTypeDefaultsApplySource

type BaseResourceTypeDefaultsApplySource struct {
	ConfigSource  TaskConfigSource
	ResourceTypes atc.VersionedResourceTypes
}

BaseResourceTypeDefaultsApplySource applies base resource type defaults to image_source.

func (BaseResourceTypeDefaultsApplySource) FetchConfig

func (configSource BaseResourceTypeDefaultsApplySource) FetchConfig(ctx context.Context, logger lager.Logger, repo *build.Repository) (atc.TaskConfig, error)

func (BaseResourceTypeDefaultsApplySource) Warnings

func (configSource BaseResourceTypeDefaultsApplySource) Warnings() []string

type BuildOutputFilter

type BuildOutputFilter func(text string) string

type BuildStepDelegate

type BuildStepDelegate interface {
	StartSpan(context.Context, string, tracing.Attrs) (context.Context, trace.Span)

	FetchImage(context.Context, atc.ImageResource, atc.VersionedResourceTypes, bool) (worker.ImageSpec, error)

	Stdout() io.Writer
	Stderr() io.Writer

	Initializing(lager.Logger)
	Starting(lager.Logger)
	Finished(lager.Logger, bool)
	SelectedWorker(lager.Logger, string)
	Errored(lager.Logger, string)
}

type BuildStepDelegateFactory

type BuildStepDelegateFactory interface {
	BuildStepDelegate(state RunState) BuildStepDelegate
}

type CheckDelegate

type CheckDelegate interface {
	BuildStepDelegate

	FindOrCreateScope(db.ResourceConfig) (db.ResourceConfigScope, error)
	WaitToRun(context.Context, db.ResourceConfigScope) (lock.Lock, bool, error)
	PointToCheckedConfig(db.ResourceConfigScope) error
}

type CheckDelegateFactory

type CheckDelegateFactory interface {
	CheckDelegate(state RunState) CheckDelegate
}

type CheckStep

type CheckStep struct {
	// contains filtered or unexported fields
}

func (*CheckStep) Run

func (step *CheckStep) Run(ctx context.Context, state RunState) (bool, error)

type EmptyVersionSource

type EmptyVersionSource struct{}

func (*EmptyVersionSource) Version

func (p *EmptyVersionSource) Version(RunState) (atc.Version, error)

type EnsureStep

type EnsureStep struct {
	// contains filtered or unexported fields
}

EnsureStep will run one step, and then a second step regardless of whether the first step fails or errors.

func Ensure

func Ensure(step Step, hook Step) EnsureStep

Ensure constructs an EnsureStep.

func (EnsureStep) Run

func (o EnsureStep) Run(ctx context.Context, state RunState) (bool, error)

Run will call Run on the first step, wait for it to complete, and then call Run on the second step, regardless of whether the first step failed or errored.

If the first step or the second step errors, an aggregate of their errors is returned.

type ErrPipelineNotFound

type ErrPipelineNotFound struct {
	PipelineName string
}

func (ErrPipelineNotFound) Error

func (e ErrPipelineNotFound) Error() string

type ErrResourceNotFound

type ErrResourceNotFound struct {
	ResourceName string
}

func (ErrResourceNotFound) Error

func (e ErrResourceNotFound) Error() string

type ExitStatus

type ExitStatus int

ExitStatus is the resulting exit code from the process that the step ran. Typically if the ExitStatus result is 0, the Success result is true.

type FileConfigSource

type FileConfigSource struct {
	ConfigPath string
	Client     worker.Client
}

FileConfigSource represents a dynamically configured TaskConfig, which will be fetched from a specified file in the artifact.Repository.

func (FileConfigSource) FetchConfig

func (configSource FileConfigSource) FetchConfig(ctx context.Context, logger lager.Logger, repo *build.Repository) (atc.TaskConfig, error)

FetchConfig reads the specified file from the artifact.Repository and loads the TaskConfig contained therein (expecting it to be YAML format).

The path must be in the format SOURCE_NAME/FILE/PATH.yml. The SOURCE_NAME will be used to determine the StreamableArtifactSource in the artifact.Repository to stream the file out of.

If the source name is missing (i.e. if the path is just "foo.yml"), UnspecifiedArtifactSourceError is returned.

If the specified source name cannot be found, UnknownArtifactSourceError is returned.

If the task config file is not found, or is invalid YAML, or is an invalid task configuration, the respective errors will be bubbled up.

func (FileConfigSource) Warnings

func (configSource FileConfigSource) Warnings() []string

type GetDelegate

type GetDelegate interface {
	StartSpan(context.Context, string, tracing.Attrs) (context.Context, trace.Span)

	FetchImage(context.Context, atc.ImageResource, atc.VersionedResourceTypes, bool) (worker.ImageSpec, error)

	Stdout() io.Writer
	Stderr() io.Writer

	Initializing(lager.Logger)
	Starting(lager.Logger)
	Finished(lager.Logger, ExitStatus, runtime.VersionResult)
	SelectedWorker(lager.Logger, string)
	Errored(lager.Logger, string)

	UpdateVersion(lager.Logger, atc.GetPlan, runtime.VersionResult)
}

type GetDelegateFactory

type GetDelegateFactory interface {
	GetDelegate(state RunState) GetDelegate
}

type GetStep

type GetStep struct {
	// contains filtered or unexported fields
}

GetStep will fetch a version of a resource on a worker that supports the resource type.

func (*GetStep) Run

func (step *GetStep) Run(ctx context.Context, state RunState) (bool, error)

type IdentityStep

type IdentityStep struct{}

IdentityStep does nothing.

func (IdentityStep) Run

Run does nothing... successfully.

type InParallelStep

type InParallelStep struct {
	// contains filtered or unexported fields
}

InParallelStep is a step of steps to run in parallel.

func InParallel

func InParallel(steps []Step, limit int, failFast bool) InParallelStep

InParallel constructs an InParallelStep.

func (InParallelStep) Run

func (step InParallelStep) Run(ctx context.Context, state RunState) (bool, error)

Run executes all steps in order and ensures that the number of running steps does not exceed the optional limit to parallelism. By default the limit is equal to the number of steps, which means all steps will all be executed in parallel.

Fail fast can be used to abort running steps if any steps exit with an error. When set to false, parallel wil wait for all the steps to exit even if a step fails or errors.

Cancelling a parallel step means that any outstanding steps will not be scheduled to run. After all steps finish, their errors (if any) will be collected and returned as a single error.

type InputHandler

type InputHandler func(io.ReadCloser) error

type InterpolateTemplateConfigSource

type InterpolateTemplateConfigSource struct {
	ConfigSource  TaskConfigSource
	Vars          []vars.Variables
	ExpectAllKeys bool
}

InterpolateTemplateConfigSource represents a config source interpolated by template vars

func (InterpolateTemplateConfigSource) FetchConfig

func (configSource InterpolateTemplateConfigSource) FetchConfig(ctx context.Context, logger lager.Logger, source *build.Repository) (atc.TaskConfig, error)

FetchConfig returns the interpolated configuration

func (InterpolateTemplateConfigSource) Warnings

func (configSource InterpolateTemplateConfigSource) Warnings() []string

type InvalidLocalVarFile

type InvalidLocalVarFile struct {
	File   string
	Format string
	Err    error
}

func (InvalidLocalVarFile) Error

func (err InvalidLocalVarFile) Error() string

type LoadVarStep

type LoadVarStep struct {
	// contains filtered or unexported fields
}

LoadVarStep loads a value from a file and sets it as a build-local var.

func (*LoadVarStep) Run

func (step *LoadVarStep) Run(ctx context.Context, state RunState) (bool, error)

type LogErrorStep

type LogErrorStep struct {
	Step
	// contains filtered or unexported fields
}

func (LogErrorStep) Run

func (step LogErrorStep) Run(ctx context.Context, state RunState) (bool, error)

type MissingInputsError

type MissingInputsError struct {
	Inputs []string
}

MissingInputsError is returned when any of the task's required inputs are missing.

func (MissingInputsError) Error

func (err MissingInputsError) Error() string

Error prints a human-friendly message listing the inputs that were missing.

type MissingTaskImageSourceError

type MissingTaskImageSourceError struct {
	SourceName string
}

func (MissingTaskImageSourceError) Error

func (err MissingTaskImageSourceError) Error() string

type OnAbortStep

type OnAbortStep struct {
	// contains filtered or unexported fields
}

OnAbortStep will run one step, and then a second step if the first step aborts (but not errors).

func OnAbort

func OnAbort(step Step, hook Step) OnAbortStep

OnAbort constructs an OnAbortStep factory.

func (OnAbortStep) Run

func (o OnAbortStep) Run(ctx context.Context, state RunState) (bool, error)

Run will call Run on the first step and wait for it to complete. If the first step errors, Run returns the error. OnAbortStep is ready as soon as the first step is ready.

If the first step aborts (that is, it gets interrupted), the second step is executed. If the second step errors, its error is returned.

type OnErrorStep

type OnErrorStep struct {
	// contains filtered or unexported fields
}

OnErrorStep will run one step, and then a second step if the first step errors.

func OnError

func OnError(step Step, hook Step) OnErrorStep

OnError constructs an OnErrorStep factory.

func (OnErrorStep) Run

func (o OnErrorStep) Run(ctx context.Context, state RunState) (bool, error)

Run will call Run on the first step and wait for it to complete. If the first step errors, Run returns the error. OnErrorStep is ready as soon as the first step is ready.

If the first step errors, the second step is executed. If the second step errors, nothing is returned.

type OnFailureStep

type OnFailureStep struct {
	// contains filtered or unexported fields
}

OnFailureStep will run one step, and then a second step if the first step fails (but not errors).

func OnFailure

func OnFailure(firstStep Step, secondStep Step) OnFailureStep

OnFailure constructs an OnFailureStep factory.

func (OnFailureStep) Run

func (o OnFailureStep) Run(ctx context.Context, state RunState) (bool, error)

Run will call Run on the first step and wait for it to complete. If the first step errors, Run returns the error. OnFailureStep is ready as soon as the first step is ready.

If the first step fails (that is, its Success result is false), the second step is executed. If the second step errors, its error is returned.

type OnSuccessStep

type OnSuccessStep struct {
	// contains filtered or unexported fields
}

OnSuccessStep will run one step, and then a second step if the first step succeeds.

func (OnSuccessStep) Run

func (o OnSuccessStep) Run(ctx context.Context, state RunState) (bool, error)

Run will call Run on the first step and wait for it to complete. If the first step errors, Run returns the error. OnSuccessStep is ready as soon as the first step is ready.

If the first step succeeds (that is, its Success result is true), the second step is executed. If the second step errors, its error is returned.

type OutputHandler

type OutputHandler func(io.Writer) error

type OverrideParamsConfigSource

type OverrideParamsConfigSource struct {
	ConfigSource TaskConfigSource
	Params       atc.TaskEnv
	WarningList  []string
}

OverrideParamsConfigSource is used to override params in a config source

func (*OverrideParamsConfigSource) FetchConfig

func (configSource *OverrideParamsConfigSource) FetchConfig(ctx context.Context, logger lager.Logger, source *build.Repository) (atc.TaskConfig, error)

FetchConfig overrides parameters, allowing the user to set params required by a task loaded from a file by providing them in static configuration.

func (OverrideParamsConfigSource) Warnings

func (configSource OverrideParamsConfigSource) Warnings() []string

type Privileged

type Privileged bool

Privileged is used to indicate whether the given step should run with special privileges (i.e. as an administrator user).

type PutDelegateFactory

type PutDelegateFactory interface {
	PutDelegate(state RunState) PutDelegate
}

type PutInputNotFoundError

type PutInputNotFoundError struct {
	Input string
}

func (PutInputNotFoundError) Error

func (e PutInputNotFoundError) Error() string

type PutInputs

type PutInputs interface {
	FindAll(*build.Repository) (map[string]runtime.Artifact, error)
}

func NewAllInputs

func NewAllInputs() PutInputs

func NewDetectInputs

func NewDetectInputs(params atc.Params) PutInputs

func NewSpecificInputs

func NewSpecificInputs(inputs []string) PutInputs

type PutStep

type PutStep struct {
	// contains filtered or unexported fields
}

PutStep produces a resource version using preconfigured params and any data available in the worker.ArtifactRepository.

func (*PutStep) Run

func (step *PutStep) Run(ctx context.Context, state RunState) (bool, error)

Run chooses a worker that supports the step's resource type and creates a container.

All worker.ArtifactSources present in the worker.ArtifactRepository are then brought into the container, using volumes if possible, and streaming content over if not.

The resource's put script is then invoked. If the context is canceled, the script will be interrupted.

type PutStepVersionSource

type PutStepVersionSource struct {
	// contains filtered or unexported fields
}

func (*PutStepVersionSource) Version

func (p *PutStepVersionSource) Version(state RunState) (atc.Version, error)

type Retriable

type Retriable struct {
	Cause error
}

func (Retriable) Error

func (r Retriable) Error() string

type RetryErrorStep

type RetryErrorStep struct {
	Step
	// contains filtered or unexported fields
}

func (RetryErrorStep) Run

func (step RetryErrorStep) Run(ctx context.Context, state RunState) (bool, error)

type RetryStep

type RetryStep struct {
	Attempts    []Step
	LastAttempt Step
}

RetryStep is a step that will run the steps in order until one of them succeeds.

func (*RetryStep) Run

func (step *RetryStep) Run(ctx context.Context, state RunState) (bool, error)

Run iterates through each step, stopping once a step succeeds. If all steps fail, the RetryStep will fail.

type RunState

type RunState interface {
	vars.Variables

	NewLocalScope() RunState
	AddLocalVar(name string, val interface{}, redact bool)

	IterateInterpolatedCreds(vars.TrackedVarsIterator)
	RedactionEnabled() bool

	ArtifactRepository() *build.Repository

	Result(atc.PlanID, interface{}) bool
	StoreResult(atc.PlanID, interface{})

	Run(context.Context, atc.Plan) (bool, error)

	Parent() RunState
}

func NewRunState

func NewRunState(
	stepper Stepper,
	credVars vars.Variables,
	enableRedaction bool,
) RunState

type ScopedStep

type ScopedStep struct {
	Step
	Values []interface{}
}

type SetPipelineStep

type SetPipelineStep struct {
	// contains filtered or unexported fields
}

SetPipelineStep sets a pipeline to current team. This step takes pipeline configure file and var files from some resource in the pipeline, like git.

func (*SetPipelineStep) Run

func (step *SetPipelineStep) Run(ctx context.Context, state RunState) (bool, error)

type SetPipelineStepDelegate

type SetPipelineStepDelegate interface {
	BuildStepDelegate
	SetPipelineChanged(lager.Logger, bool)
}

type SetPipelineStepDelegateFactory

type SetPipelineStepDelegateFactory interface {
	SetPipelineStepDelegate(state RunState) SetPipelineStepDelegate
}

type StaticConfigSource

type StaticConfigSource struct {
	Config *atc.TaskConfig
}

StaticConfigSource represents a statically configured TaskConfig.

func (StaticConfigSource) FetchConfig

FetchConfig returns the configuration.

func (StaticConfigSource) Warnings

func (configSource StaticConfigSource) Warnings() []string

type StaticVersionSource

type StaticVersionSource struct {
	// contains filtered or unexported fields
}

func (*StaticVersionSource) Version

func (p *StaticVersionSource) Version(RunState) (atc.Version, error)

type Step

type Step interface {
	// Run executes the step, returning true if the step succeeds, false if it
	// fails, or an error if an error occurs.
	//
	// Run should watch for the given context to be canceled in the event that
	// the build is aborted or the step times out, and be sure to propagate the
	// (context.Context).Err().
	//
	// Steps wrapping other steps should be careful to propagate the context.
	//
	// Steps must be idempotent. Each step is responsible for handling its own
	// idempotency.
	Run(context.Context, RunState) (bool, error)
}

A Step is an object that can be executed, whose result (e.g. Success) can be collected, and whose dependent resources (e.g. Containers, Volumes) can be released, allowing them to expire.

func LogError

func LogError(step Step, delegateFactory BuildStepDelegateFactory) Step

func NewArtifactInputStep

func NewArtifactInputStep(plan atc.Plan, build db.Build, workerClient worker.Client) Step

func NewArtifactOutputStep

func NewArtifactOutputStep(plan atc.Plan, build db.Build, workerClient worker.Client) Step

func NewCheckStep

func NewCheckStep(
	planID atc.PlanID,
	plan atc.CheckPlan,
	metadata StepMetadata,
	resourceFactory resource.ResourceFactory,
	resourceConfigFactory db.ResourceConfigFactory,
	containerMetadata db.ContainerMetadata,
	strategy worker.ContainerPlacementStrategy,
	pool worker.Pool,
	delegateFactory CheckDelegateFactory,
	client worker.Client,
	defaultCheckTimeout time.Duration,
) Step

func NewGetStep

func NewGetStep(
	planID atc.PlanID,
	plan atc.GetPlan,
	metadata StepMetadata,
	containerMetadata db.ContainerMetadata,
	resourceFactory resource.ResourceFactory,
	resourceCacheFactory db.ResourceCacheFactory,
	strategy worker.ContainerPlacementStrategy,
	delegateFactory GetDelegateFactory,
	client worker.Client,
) Step

func NewLoadVarStep

func NewLoadVarStep(
	planID atc.PlanID,
	plan atc.LoadVarPlan,
	metadata StepMetadata,
	delegateFactory BuildStepDelegateFactory,
	client worker.Client,
) Step

func NewPutStep

func NewPutStep(
	planID atc.PlanID,
	plan atc.PutPlan,
	metadata StepMetadata,
	containerMetadata db.ContainerMetadata,
	resourceFactory resource.ResourceFactory,
	resourceConfigFactory db.ResourceConfigFactory,
	strategy worker.ContainerPlacementStrategy,
	workerClient worker.Client,
	delegateFactory PutDelegateFactory,
) Step

func NewSetPipelineStep

func NewSetPipelineStep(
	planID atc.PlanID,
	plan atc.SetPipelinePlan,
	metadata StepMetadata,
	delegateFactory SetPipelineStepDelegateFactory,
	teamFactory db.TeamFactory,
	buildFactory db.BuildFactory,
	client worker.Client,
	policyChecker policy.Checker,
) Step

func NewTaskStep

func NewTaskStep(
	planID atc.PlanID,
	plan atc.TaskPlan,
	defaultLimits atc.ContainerLimits,
	metadata StepMetadata,
	containerMetadata db.ContainerMetadata,
	strategy worker.ContainerPlacementStrategy,
	workerClient worker.Client,
	delegateFactory TaskDelegateFactory,
	lockFactory lock.LockFactory,
) Step

func OnSuccess

func OnSuccess(firstStep Step, secondStep Step) Step

OnSuccess constructs an OnSuccessStep factory.

func Retry

func Retry(attempts ...Step) Step

func RetryError

func RetryError(step Step, delegateFactory BuildStepDelegateFactory) Step

func Try

func Try(step Step) Step

Try constructs a TryStep.

type StepMetadata

type StepMetadata struct {
	BuildID              int
	BuildName            string
	TeamID               int
	TeamName             string
	JobID                int
	JobName              string
	PipelineID           int
	PipelineName         string
	PipelineInstanceVars map[string]interface{}
	ExternalURL          string
}

func (StepMetadata) Env

func (metadata StepMetadata) Env() []string

type Stepper

type Stepper func(atc.Plan) Step

type TaskConfigSource

type TaskConfigSource interface {
	// FetchConfig returns the TaskConfig, and may have to a task config file out
	// of the artifact.Repository.
	FetchConfig(context.Context, lager.Logger, *build.Repository) (atc.TaskConfig, error)
	Warnings() []string
}

TaskConfigSource is used to determine a Task step's TaskConfig.

type TaskDelegate

type TaskDelegate interface {
	StartSpan(context.Context, string, tracing.Attrs) (context.Context, trace.Span)

	FetchImage(context.Context, atc.ImageResource, atc.VersionedResourceTypes, bool) (worker.ImageSpec, error)

	Stdout() io.Writer
	Stderr() io.Writer

	SetTaskConfig(config atc.TaskConfig)

	Initializing(lager.Logger)
	Starting(lager.Logger)
	Finished(lager.Logger, ExitStatus)
	SelectedWorker(lager.Logger, string)
	Errored(lager.Logger, string)
}

type TaskDelegateFactory

type TaskDelegateFactory interface {
	TaskDelegate(state RunState) TaskDelegate
}

type TaskImageSourceParametersError

type TaskImageSourceParametersError struct {
	Err error
}

func (TaskImageSourceParametersError) Error

type TaskStep

type TaskStep struct {
	// contains filtered or unexported fields
}

TaskStep executes a TaskConfig, whose inputs will be fetched from the artifact.Repository and outputs will be added to the artifact.Repository.

func (*TaskStep) Run

func (step *TaskStep) Run(ctx context.Context, state RunState) (bool, error)

Run will first select the worker based on the TaskConfig's platform and the TaskStep's tags, and prioritize it by availability of volumes for the TaskConfig's inputs. Inputs that did not have volumes available on the worker will be streamed in to the container.

If any inputs are not available in the artifact.Repository, MissingInputsError is returned.

Once all the inputs are satisfied, the task's script will be executed. If the task is canceled via the context, the script will be interrupted.

If the script exits successfully, the outputs specified in the TaskConfig are registered with the artifact.Repository. If no outputs are specified, the task's entire working directory is registered as an StreamableArtifactSource under the name of the task.

type TimeoutStep

type TimeoutStep struct {
	// contains filtered or unexported fields
}

TimeoutStep applies a fixed timeout to a step's Run.

func Timeout

func Timeout(step Step, duration string) *TimeoutStep

Timeout constructs a TimeoutStep factory.

func (*TimeoutStep) Run

func (ts *TimeoutStep) Run(ctx context.Context, state RunState) (bool, error)

Run parses the timeout duration and invokes the nested step.

If the nested step takes longer than the duration, it is sent the Interrupt signal, and the TimeoutStep returns nil once the nested step exits (ignoring the nested step's error).

The result of the nested step's Run is returned.

type TryStep

type TryStep struct {
	// contains filtered or unexported fields
}

TryStep wraps another step, ignores its errors, and always succeeds.

func (*TryStep) Run

func (ts *TryStep) Run(ctx context.Context, state RunState) (bool, error)

Run runs the nested step, and always returns nil, ignoring the nested step's error.

type UnknownArtifactSourceError

type UnknownArtifactSourceError struct {
	SourceName build.ArtifactName
	ConfigPath string
}

UnknownArtifactSourceError is returned when the artifact.ArtifactName specified by the path does not exist in the artifact.Repository.

func (UnknownArtifactSourceError) Error

func (err UnknownArtifactSourceError) Error() string

Error returns a human-friendly error message.

type UnspecifiedArtifactSourceError

type UnspecifiedArtifactSourceError struct {
	Path string
}

UnspecifiedArtifactSourceError is returned when the specified path is of a file in the toplevel directory, and so it does not indicate a SourceName.

func (UnspecifiedArtifactSourceError) Error

Error returns a human-friendly error message.

type UnspecifiedLoadVarStepFileError

type UnspecifiedLoadVarStepFileError struct {
	File string
}

func (UnspecifiedLoadVarStepFileError) Error

Error returns a human-friendly error message.

type ValidatingConfigSource

type ValidatingConfigSource struct {
	ConfigSource TaskConfigSource
}

ValidatingConfigSource delegates to another ConfigSource, and validates its task config.

func (ValidatingConfigSource) FetchConfig

func (configSource ValidatingConfigSource) FetchConfig(ctx context.Context, logger lager.Logger, source *build.Repository) (atc.TaskConfig, error)

FetchConfig fetches the config using the underlying ConfigSource, and checks that it's valid.

func (ValidatingConfigSource) Warnings

func (configSource ValidatingConfigSource) Warnings() []string

type VersionSource

type VersionSource interface {
	Version(RunState) (atc.Version, error)
}

func NewVersionSourceFromPlan

func NewVersionSourceFromPlan(getPlan *atc.GetPlan) VersionSource

Directories

Path Synopsis
buildfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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