abstruse icon indicating copy to clipboard operation
abstruse copied to clipboard

after_failure not works as expected

Open inkvizitor68sl opened this issue 3 years ago • 0 comments

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:

  1. 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
  1. 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 =(

inkvizitor68sl avatar Jun 04 '21 19:06 inkvizitor68sl