abstruse
abstruse copied to clipboard
after_failure not works as expected
Hi.
In docs/ABSTRUSE_YML.md we can find information about after_success/after_failure sections for .abstruse.yml But currently after_failure not works as described:
- If "script" part was successfull abstruse run both of after_success/after_failure:
Hello world
==> /bin/true
==> ci-helpers success_mail
==> ci-helpers failed_mail
Exit code: 0
- If script failed - none of them will be executed:
Hello world
==> /bin/false
Exit code: 1
==> rpc error: code = Unknown desc = errored: 1
Probably because of this - https://github.com/bleenco/abstruse/blob/master/server/parser/parser.go#L191 Looks like all yaml sections (before_script/script/after_success/after_failure) mixed here to one structure and they executing just one by one until something failed without separate logic for after_failure.
Sorry, not powered in golang to make patch example for that =(