New feature: Handling errors in actions

February 20, 2020

New feature: Handling errors in actions

The principle of Continuous Integration is simple: make changes > test for errors > integrate with code if everything is okay / fix bugs and test again if something's wrong. In Buddy, these tasks are performed by pipeline actions. If something goes wrong (e.g. the tests fail), Buddy will stop the pipeline and mark the responsible action as failed. One should never merge a branch with errors: this is an impassable rule that should never be violated and this is why we never allowed the pipeline to continue if an action was failing.

However, the rule does not apply to all actions that Buddy has to offer. For example, you can create a CI pipeline with a Slack action in the end. Let's assume Slack failed to deliver the message for one reason or another: even though it happened, the most important part is that the tests have passed, so the pipeline should still finish as successful. This is where you can apply our new feature: the way errors are handled.

Configuration

The feature is available in the Action tab of the action details:

Defining error handlingDefining error handling

Once it's selected, Buddy will continue to execute the pipeline even if the selected action has failed. The action will be marked with a small warning sign on the execution details:

Failed action on the execution viewFailed action on the execution view

The above screenshot is just an example – you certainly DO NOT want to proceed if CodeSniffer sniffed errors in your code! :)
If you are using submodules in your project, the warning state will be automatically applied in the Prepare environment step in case of errors during the submodule fetch.

The sign will also be visible on the affected pipeline:

Pipeline wih errorPipeline wih error

Share:

Alexander Kus

Alexander Kus

Customer Success Manager

A story-teller and conversation-lover, Alexander decided to invest his skills to help his friends at Buddy transform the cold language of patch notes into exciting narratives. Also: an avid gamer, hip-hop DJ, Liverpool FC fan, absentminded husband, and the father of two.