exec

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const AbortedLogMessage = "interrupted"
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 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) 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.

func (AggregateStep) Succeeded

func (step AggregateStep) Succeeded() bool

Succeeded is true if all of the steps' Succeeded is true

type ArtifactInputStep

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

func (*ArtifactInputStep) Run

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

func (*ArtifactInputStep) Succeeded

func (step *ArtifactInputStep) Succeeded() bool

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) error

func (*ArtifactOutputStep) Succeeded

func (step *ArtifactOutputStep) Succeeded() bool

type ArtifactVolumeNotFoundError

type ArtifactVolumeNotFoundError struct {
	ArtifactName string
}

func (ArtifactVolumeNotFoundError) Error

type BuildOutputFilter

type BuildOutputFilter func(text string) string

type BuildStepDelegate

type BuildStepDelegate interface {
	ImageVersionDetermined(db.UsedResourceCache) error
	RedactImageSource(source atc.Source) (atc.Source, error)

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

	Variables() vars.CredVarsTracker

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

type CheckDelegate

type CheckDelegate interface {
	BuildStepDelegate

	SaveVersions(db.SpanContext, []atc.Version) error
}

type CheckStep

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

func NewCheckStep

func NewCheckStep(
	planID atc.PlanID,
	plan atc.CheckPlan,
	metadata StepMetadata,
	resourceFactory resource.ResourceFactory,
	containerMetadata db.ContainerMetadata,
	strategy worker.ContainerPlacementStrategy,
	pool worker.Pool,
	delegate CheckDelegate,
	client worker.Client,
) *CheckStep

func (*CheckStep) Run

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

func (*CheckStep) Succeeded

func (step *CheckStep) Succeeded() bool

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) 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.

func (EnsureStep) Succeeded

func (o EnsureStep) Succeeded() bool

Succeeded is true if both of its steps succeeded.

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 {
	ImageVersionDetermined(db.UsedResourceCache) error
	RedactImageSource(source atc.Source) (atc.Source, error)

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

	Variables() vars.CredVarsTracker

	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 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) error

func (*GetStep) Succeeded

func (step *GetStep) Succeeded() bool

Succeeded returns true if the resource was successfully fetched.

type IdentityStep

type IdentityStep struct{}

IdentityStep does nothing.

func (IdentityStep) Run

Run does nothing.

func (IdentityStep) Succeeded

func (IdentityStep) Succeeded() bool

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) 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.

func (InParallelStep) Succeeded

func (step InParallelStep) Succeeded() bool

Succeeded is true if all of the steps' Succeeded is true

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) error

func (*LoadVarStep) Succeeded

func (step *LoadVarStep) Succeeded() bool

type LogErrorStep

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

func (LogErrorStep) Run

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

type LogErrorStepDelegate

type LogErrorStepDelegate interface {
	Errored(lager.Logger, string)
}

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) 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.

func (OnAbortStep) Succeeded

func (o OnAbortStep) Succeeded() bool

Succeeded is true if the first step doesn't exist, or if it completed successfully.

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) 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.

func (OnErrorStep) Succeeded

func (o OnErrorStep) Succeeded() bool

Succeeded is true if the first step doesn't exist, or if it completed successfully.

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) 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.

func (OnFailureStep) Succeeded

func (o OnFailureStep) Succeeded() bool

Succeeded is true if the first step doesn't exist, or if it completed successfully.

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) 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.

func (OnSuccessStep) Succeeded

func (o OnSuccessStep) Succeeded() bool

Succeeded is true if the first step completed and the second step completed successfully.

type OutputHandler

type OutputHandler func(io.Writer) error

type OverrideParamsConfigSource

type OverrideParamsConfigSource struct {
	ConfigSource TaskConfigSource
	Params       atc.Params
	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 PutDelegate

type PutDelegate interface {
	ImageVersionDetermined(db.UsedResourceCache) error
	RedactImageSource(source atc.Source) (atc.Source, error)

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

	Variables() vars.CredVarsTracker

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

	SaveOutput(lager.Logger, atc.PutPlan, atc.Source, atc.VersionedResourceTypes, runtime.VersionResult)
}

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) 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.

func (*PutStep) Succeeded

func (step *PutStep) Succeeded() bool

Succeeded returns true if the resource script exited successfully.

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) error

type RetryErrorStepDelegate

type RetryErrorStepDelegate interface {
	Errored(lager.Logger, string)
}

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) error

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

func (*RetryStep) Succeeded

func (step *RetryStep) Succeeded() bool

Succeeded delegates to the last step that it ran.

type RunState

type RunState interface {
	ArtifactRepository() *build.Repository

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

func NewRunState

func NewRunState() RunState

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) error

func (*SetPipelineStep) Succeeded

func (step *SetPipelineStep) Succeeded() bool

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 is called when it's time to execute the step. It 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) error

	// Succeeded is true when the Step succeeded, and false otherwise.
	// Succeeded is not guaranteed to be truthful until after you run Run()
	Succeeded() bool
}

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, delegate LogErrorStepDelegate) Step

func NewArtifactInputStep

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

func NewArtifactOutputStep

func NewArtifactOutputStep(plan atc.Plan, build db.Build, workerClient worker.Client, delegate BuildStepDelegate) 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,
	delegate GetDelegate,
	client worker.Client,
) Step

func NewLoadVarStep

func NewLoadVarStep(
	planID atc.PlanID,
	plan atc.LoadVarPlan,
	metadata StepMetadata,
	delegate BuildStepDelegate,
	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,
	delegate PutDelegate,
) Step

func NewSetPipelineStep

func NewSetPipelineStep(
	planID atc.PlanID,
	plan atc.SetPipelinePlan,
	metadata StepMetadata,
	delegate BuildStepDelegate,
	teamFactory db.TeamFactory,
	buildFactory db.BuildFactory,
	client worker.Client,
) 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,
	delegate TaskDelegate,
	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, delegate RetryErrorStepDelegate) 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
	ResourceConfigScopeID int
	ResourceConfigID      int
	BaseResourceTypeID    int
	ExternalURL           string
}

func (StepMetadata) Env

func (metadata StepMetadata) Env() []string

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 {
	ImageVersionDetermined(db.UsedResourceCache) error
	RedactImageSource(source atc.Source) (atc.Source, error)

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

	Variables() vars.CredVarsTracker

	SetTaskConfig(config atc.TaskConfig)

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

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) 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.

func (*TaskStep) Succeeded

func (step *TaskStep) Succeeded() bool

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) 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.

func (*TimeoutStep) Succeeded

func (ts *TimeoutStep) Succeeded() bool

Succeeded is true if the nested step completed successfully and did not time out.

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) error

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

func (*TryStep) Succeeded

func (ts *TryStep) Succeeded() bool

Succeeded is true

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