woodpecker icon indicating copy to clipboard operation
woodpecker copied to clipboard

Add option to ignore failures on steps

Open sergiofenoll opened this issue 2 years ago • 7 comments

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

sergiofenoll avatar Sep 27 '22 22:09 sergiofenoll

first impression looks good

lets let the ci run over itselve ;) and then I'll have a look

6543 avatar Sep 27 '22 22:09 6543

with shell magic you normaly can ignore errors right now too ... but plugins dont ... and this could be a simplification

In any case if we add it documentation is missing (https://github.com/woodpecker-ci/woodpecker/blob/master/docs/docs/20-usage/20-pipeline-syntax.md)

6543 avatar Sep 27 '22 22:09 6543

just exec make format and commit changes - we ensure proper code format via ci

6543 avatar Sep 27 '22 22:09 6543

with shell magic you normaly can ignore errors right now too ...

You're right, but at work we wanted a simple equivalent to Drone's failure: ignore, so I wanted to have a try at implementing it :smile:

If the addition is okay as-is I'll try to add the docs tomorrow morning (thanks for mentioning it!)

sergiofenoll avatar Sep 27 '22 22:09 sergiofenoll

it does only add to pipeline config ... and dont move much code so why not

the only question would be: show error in UI and a ignored lable or not not -> as is now show in ui -> need bit more code (can be added later anyway)

6543 avatar Sep 27 '22 22:09 6543

Codecov Report

Base: 44.74% // Head: 44.75% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (d84a499) compared to base (e901f60). Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1219   +/-   ##
=======================================
  Coverage   44.74%   44.75%           
=======================================
  Files         139      139           
  Lines        9910     9919    +9     
=======================================
+ Hits         4434     4439    +5     
- Misses       5197     5201    +4     
  Partials      279      279           
Impacted Files Coverage Δ
pipeline/frontend/yaml/compiler/convert.go 0.00% <0.00%> (ø)
pipeline/frontend/yaml/container.go 82.35% <ø> (ø)
pipeline/pipeline.go 0.00% <0.00%> (ø)
server/logging/log.go 54.65% <0.00%> (+5.81%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Sep 27 '22 23:09 codecov-commenter

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-1219.surge.sh

woodpecker-bot avatar Sep 28 '22 18:09 woodpecker-bot