You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
Add option to ignore failures on steps (#1219)
closes #1181 closes #834 Adds `ignore_failure` to pipeline steps. When it's set to true, if the step fails the following steps continue to execute as if no failure had occurred. --- failure enums idea: * fail (default) = if other steps run in parallel, wait for them and then let workflow fail * cancel = if other steps run in parallel, kill them * ignore = we mark the step as failed but it wont have any impact
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
backend "github.com/woodpecker-ci/woodpecker/pipeline/backend/types"
|
||||
"github.com/woodpecker-ci/woodpecker/pipeline/frontend"
|
||||
"github.com/woodpecker-ci/woodpecker/pipeline/multipart"
|
||||
)
|
||||
|
||||
@@ -193,7 +194,11 @@ func (r *Runtime) execAll(steps []*backend.Step) <-chan error {
|
||||
}
|
||||
|
||||
// Return the error after tracing it.
|
||||
return r.traceStep(processState, err, step)
|
||||
err = r.traceStep(processState, err, step)
|
||||
if err != nil && step.Failure == frontend.FailureIgnore {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user