1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

#534 feat: step continues when continue-on-error is ture (#544)

* feat: step continues when continue-on-error is ture

* fix: typo, logging and make bool continuable

Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Horimatsu Takuya 2021-02-26 01:55:07 +09:00 committed by GitHub
parent f15abae92e
commit 530fa17534

View file

@ -225,7 +225,14 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor {
common.Logger(ctx).Infof(" \u2705 Success - %s", sc.Step) common.Logger(ctx).Infof(" \u2705 Success - %s", sc.Step)
} else { } else {
common.Logger(ctx).Errorf(" \u274C Failure - %s", sc.Step) common.Logger(ctx).Errorf(" \u274C Failure - %s", sc.Step)
rc.StepResults[rc.CurrentStep].Success = false
if sc.Step.ContinueOnError {
common.Logger(ctx).Infof("Failed but continue next step")
err = nil
rc.StepResults[rc.CurrentStep].Success = true
} else {
rc.StepResults[rc.CurrentStep].Success = false
}
} }
return err return err
} }