probo icon indicating copy to clipboard operation
probo copied to clipboard

Stop builds if a build fails

Open AlexU-A opened this issue 7 years ago • 5 comments

In order to prevent deployments or other build steps, it would be great to have the option to stop the build process upon receiving an error.

Current behavior: In some cases when a build step fails, for example when a behat test fails, the build process continues to the next step.

Proposed behavior: Allow a configuration option that denotes when an error in a build step should terminate the process.

AlexU-A avatar Jul 25 '17 18:07 AlexU-A

I think we should expand upon this idea a bit. Additionally, we add lifecycle hooks:

steps:
  .......
after_success:
  - command: .....
after_fail:
  - command: ...

tortillaj avatar Dec 06 '17 15:12 tortillaj

Worth noting, this was implemented in the long-sitting build-class branch.

tizzo avatar Dec 06 '17 20:12 tizzo

@tizzo do you happen to remember the status of that branch? I know we still needed to track down a bug, but I don't remember exactly where it was left.

tortillaj avatar Dec 08 '17 16:12 tortillaj

I tracked down the bug but there are several branches with some debugging code - it needs to be reconciled and a touch more work done to supplant what's in master today. It has a ton of new features though including having task "stacks", which are a list of tasks that run separately but are reported as one unit back to GitHub, marking tasks optional (say on a per-task basis whether to abandon the build if this task fails, defaults true), reporting that a task fails without failing the build as a whole, etc.

tizzo avatar Dec 09 '17 19:12 tizzo

Going to review these branches and see if I can get something testable on the lower environment.

ElusiveMind avatar Nov 05 '22 22:11 ElusiveMind