bitops
bitops copied to clipboard
Preserve the exit-code for "fail-fast: false" mode
The fail-fast mode will exit with non-zero code immediately when there's an error in deployment. This is as intended.
However, currently, when the fail-fast mode is disabled and there's an error in deployment, BitOps will run until the end and exit with 0
return code like it was a success.
The expectation from the fail-fast: false mode is to run all the deployment steps, but defer the error code (if any) and bubble it up to the BitOps finish exit code. This way we exit with non-zero if some deployment in the middle of the pipeline was unsuccessful.
My question here is; In a list of 4 services, if 2 fails with different codes, which would be reported?
Or is the intention to create a reportable object such as;
service:returncode
{
"service1": "0",
"service2": "2",
"service3": "0",
"service4": "3",
}
For me, any non-zero works great, as long as we don't report "success" if there was an "error".
Even 101
, like we did here
https://github.com/bitovi/bitops/blob/dab9410f793a56a37105f6232e11c6616432a3a8/scripts/plugins/utilities.py#L375
So this is the type of error that I would recommend putting into the doc lookup under an entry like: multiple processing failures
, code:101
(or w.e)
But yea I agree with this 👍
This would be an insanely easy first-issue
as well btw
Let's add the respective tag then!