atc/exec: expose task/put Run comments
when wrapping the old `Run` methods, I end up making the comments pertaining to the private methods, not making them visible anymore. this commit reverts that Signed-off-by: Ciro S. Costa <cscosta@pivotal.io>
This commit is contained in:
parent
fbf6f8509e
commit
4049386b03
|
@ -73,6 +73,14 @@ func NewPutStep(
|
|||
}
|
||||
}
|
||||
|
||||
// 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 (step *PutStep) Run(ctx context.Context, state RunState) error {
|
||||
ctx, span := tracing.StartSpan(ctx, "put", tracing.Attrs{
|
||||
"team": step.metadata.TeamName,
|
||||
|
@ -89,14 +97,6 @@ func (step *PutStep) Run(ctx context.Context, state RunState) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// 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 (step *PutStep) run(ctx context.Context, state RunState) error {
|
||||
logger := lagerctx.FromContext(ctx)
|
||||
logger = logger.Session("put-step", lager.Data{
|
||||
|
|
|
@ -107,6 +107,21 @@ func NewTaskStep(
|
|||
}
|
||||
}
|
||||
|
||||
// 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 (step *TaskStep) Run(ctx context.Context, state RunState) error {
|
||||
ctx, span := tracing.StartSpan(ctx, "task", tracing.Attrs{
|
||||
"team": step.metadata.TeamName,
|
||||
|
@ -122,21 +137,6 @@ func (step *TaskStep) Run(ctx context.Context, state RunState) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// 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 (step *TaskStep) run(ctx context.Context, state RunState) error {
|
||||
logger := lagerctx.FromContext(ctx)
|
||||
logger = logger.Session("task-step", lager.Data{
|
||||
|
|
Loading…
Reference in New Issue