probo
probo copied to clipboard
Stop builds if a build fails
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.
I think we should expand upon this idea a bit. Additionally, we add lifecycle hooks:
steps:
.......
after_success:
- command: .....
after_fail:
- command: ...
Worth noting, this was implemented in the long-sitting build-class
branch.
@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.
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.
Going to review these branches and see if I can get something testable on the lower environment.