# Allow the rerunning of successful pipeline steps

**URL:** <https://forum.buildkite.community/t/allow-the-rerunning-of-successful-pipeline-steps/1931>\
**Category:** Features Requests\
**Created:** [March 1, 2022, 11:10am UTC](https://forum.buildkite.community/t/allow-the-rerunning-of-successful-pipeline-steps/1931 "2022-03-01T11:10:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidalshrokt](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@davidalshrokt](https://forum.buildkite.community/u/davidalshrokt)\
**Post date:** [March 1, 2022, 11:10am UTC](https://forum.buildkite.community/t/allow-the-rerunning-of-successful-pipeline-steps/1931/1 "2022-03-01T11:10:43Z")

</div>

This can make it easier for use cases like:

- 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

---

<div class="post-metadata">

**Author:** ![suma](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/suma/32/1306_2.png) [@suma](https://forum.buildkite.community/u/suma)\
**Post date:** [March 1, 2022, 6:18pm UTC](https://forum.buildkite.community/t/allow-the-rerunning-of-successful-pipeline-steps/1931/2 "2022-03-01T18:18:30Z")

</div>

Hi David,

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](https://buildkite.com/docs/pipelines/command-step#automatic-retry-attributes) 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.

---

<div class="post-metadata">

**Author:** ![twometresteve3](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@twometresteve3](https://forum.buildkite.community/u/twometresteve3)\
**Post date:** [March 2, 2022, 11:20pm UTC](https://forum.buildkite.community/t/allow-the-rerunning-of-successful-pipeline-steps/1931/3 "2022-03-02T23:20:12Z")

</div>

I think `permit_on_passed` does what you want?

See [https://buildkite.com/docs/pipelines/command-step#retry-attributes](https://buildkite.com/docs/pipelines/command-step#retry-attributes).

```auto
    retry:
      manual:
        permit_on_passed: true

```
