woodpecker-ci / woodpecker

Woodpecker is a simple yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
3.88k stars 345 forks source link

Exit-codes are not used by server #3848

Open anbraten opened 6 days ago

anbraten commented 6 days ago

The state send to the server contains an exit-code for the workflow. However as workflows have no exit-code they get simply ignored and are only considered by logging:

https://github.com/woodpecker-ci/woodpecker/blob/2bda19024ece0bf0deab5244fb8799f653d5adfc/agent/runner.go#L159-L175

In case of a canceled pipeline we even seem to remove the error: https://github.com/woodpecker-ci/woodpecker/blob/2bda19024ece0bf0deab5244fb8799f653d5adfc/agent/runner.go#L168

sounds to be related to #2197