Hello Everybody.
Introduction
This article gives an insight into what Post Retry Failure Actions are and how they can be leveraged in Deployment Configs as a Failure Strategy.
Summary
A failure strategy defines how your stages and steps handle different failure conditions. The failure strategy contains error conditions that must occur for the strategy to apply, and actions to take when the conditions occur.
Failure strategies are a critical pipeline design component that determines what fails a step or stage and what to do when the failure occurs. There are multiple actions that are present for Failure strategies but the one we will be focusing on today is the Retry Action.
When this Action is selected Harness will retry the execution of the failed step automatically. You can also set the number of times you want the retry to be executed after a failure by providing a count under the field Retry Count and Retry Intervals which allows you to select how long after the last retry you want the next to be run.
Post Retry Failure Actions
This is the functionality where the Retry Mechanism differes from the other Actions provided as it contains a function called Post Retry Failure Actions.
These actions are executed only after all the Retries result in a failure, which means that the Retry count has been exhausted post which, this action will define what the final outcome will be.
Ignore Failure : This Action when selected after the Retry count is exhausted continues the execution of the next Stages. The step is marked as Failed , but no rollback is triggered.
Mark as Success : The step is marked as Successful and the stage execution continues.
Abort : Pipeline execution is aborted. If you select this option, no Timeout is needed.
Proceed with Default Values : This Action will continue to run the stages with the default values of the variables defined as part of the Step. The outcome of this run will be considered the final result which can be Success or failure.