Using steps to deploy and rerunning a deployment step as a rollback mechanism
If you have flakey tests, re-run a successful testing step several times will be faster than rerunning an entire pipeline to see if it fails on subsequent runs
First of all welcome to Buildkite community and thank you asking the question.
Regarding use case 1 which is “Using steps to deploy and rerunning a deployment step as a rollback mechanism” are you referring to retry of a specific step even though it is successful ?
Regarding use case 2, one option is using automatic retry attribute with exit_status as 0 and setting limit to number of retries you prefer so that way a step can be re run for flakey tests scenario
For use case 1, if it is also about retrying a successful step then same automatic retry attribute with exit_status as 0 should help. If not, please can you share more details on it so I can look into it.
Once again thank you for asking the question and welcome to the Buildkite community.