Complete runner lifecycle refactor
This commit is contained in:
@@ -12,6 +12,10 @@ import (
|
||||
|
||||
// Run executes the pipeline plan and persists manifest state.
|
||||
func Run(ctx context.Context, args []string, out io.Writer) error {
|
||||
return runWithPipelineExecutor(ctx, args, out, executePlan)
|
||||
}
|
||||
|
||||
func runWithPipelineExecutor(ctx context.Context, args []string, out io.Writer, executor pipelineExecutor) error {
|
||||
request, err := parseBoundedRunRequest("run", args, out)
|
||||
if err != nil {
|
||||
if errors.Is(err, flag.ErrHelp) {
|
||||
@@ -37,7 +41,7 @@ func Run(ctx context.Context, args []string, out io.Writer) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("run: %w", err)
|
||||
}
|
||||
summary, err := executeStagesFn(ctx, cfg, request.Plan, RunOptions{
|
||||
summary, err := executor(ctx, cfg, request.Plan, RunOptions{
|
||||
Force: request.Force,
|
||||
SelectedArtifacts: selectedArtifacts,
|
||||
EffectiveArtifacts: effectiveArtifacts,
|
||||
|
||||
Reference in New Issue
Block a user