change order of skip checks

pull/5/head
Brad Rydzewski 4 years ago
parent 9f0ba71ae2
commit 2020a87dfb

@ -187,10 +187,6 @@ func (e *Execer) exec(ctx context.Context, state *pipeline.State, spec Spec, ste
}
switch {
case state.Finished(step.GetName()):
// skip if the step if already in a finished state,
// for example, if the step is marked as skipped.
return nil
case state.Cancelled():
// skip if the pipeline was cancelled, either by the
// end user or due to timeout.
@ -205,6 +201,10 @@ func (e *Execer) exec(ctx context.Context, state *pipeline.State, spec Spec, ste
case step.GetRunPolicy() == RunOnSuccess && state.Failed():
state.Skip(step.GetName())
return e.reporter.ReportStep(noContext, state, step.GetName())
case state.Finished(step.GetName()):
// skip if the step if already in a finished state,
// for example, if the step is marked as skipped.
return nil
}
state.Start(step.GetName())

Loading…
Cancel
Save