Retry job in case of AWS Spot Instance interruption event
In our GitLab runner autoscaling setup, we have one AWS instance per job. AWS can interrupt the spot instance anytime, so let's retry the job when the interruption event happens to avoid a pipeline failure.
The functionality was tested via spot instance interruption simulation using the AWS console. Example of the output from the failed job due to the AWS spot instance interruption event.
Edited by Emanuel Petr