diff --git a/executor/linux/step.go b/executor/linux/step.go index ff7ccfe0..34b016a7 100644 --- a/executor/linux/step.go +++ b/executor/linux/step.go @@ -152,6 +152,7 @@ func (c *client) ExecStep(ctx context.Context, ctn *pipeline.Container) error { // run the runtime container err = c.Runtime.RunContainer(ctx, ctn, c.pipeline) if err != nil { + // set step status to error and step error _step.SetStatus(constants.StatusError) _step.SetError(err.Error()) diff --git a/executor/local/step.go b/executor/local/step.go index 67b6b28f..36f7e726 100644 --- a/executor/local/step.go +++ b/executor/local/step.go @@ -83,8 +83,10 @@ func (c *client) ExecStep(ctx context.Context, ctn *pipeline.Container) error { // run the runtime container err = c.Runtime.RunContainer(ctx, ctn, c.pipeline) if err != nil { + // set step status to error and step error _step.SetStatus(constants.StatusError) _step.SetError(err.Error()) + return err }