# How to stop running CI build in specific workflow

**URL:** <https://discuss.bitrise.io/t/how-to-stop-running-ci-build-in-specific-workflow/3851>\
**Category:** Question & Answer\
**Tags:** ios\
**Created:** [January 23, 2018, 2:52pm UTC](https://discuss.bitrise.io/t/how-to-stop-running-ci-build-in-specific-workflow/3851 "2018-01-23T14:52:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jahanvi\_vyas](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jahanvi\_vyas](https://discuss.bitrise.io/u/jahanvi_vyas)\
**Post date:** [January 23, 2018, 2:52pm UTC](https://discuss.bitrise.io/t/how-to-stop-running-ci-build-in-specific-workflow/3851/1 "2018-01-23T14:52:02Z")

</div>

I have setup couple of workflows and I have 1 condition in second step if that fails I want to stop that CI build. Is there any command/script I can use to stop the build.

Currently I am using “run\_if” to do that job. But I have to add that for all the following steps. Is there any single line command that I can use only in that step and it won’t proceed further.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 23, 2018, 4:52pm UTC](https://discuss.bitrise.io/t/how-to-stop-running-ci-build-in-specific-workflow/3851/2 "2018-01-23T16:52:59Z")

</div>

Hi @jahanvi_vyas,

There’s no command for that, but as a workaround you can use the API to abort the build, if that’s an option: [http://devcenter.bitrise.io/api/v0.1/#post-appsapp-slugbuildsbuild-slugabort](http://devcenter.bitrise.io/api/v0.1/#post-appsapp-slugbuildsbuild-slugabort)

P.S.: there’s an option to abort _with success_ (`abort_with_success`), which will still mark the build as aborted but will send a “Success” status to your git hosting service as the build’s status, as well as has a different design on the [bitrise.io](http://bitrise.io) UI (not success / green though). If you want to disable the “build was aborted” emails you can also do that via the API, `skip_notifications` parameter.

If you’d have any questions just let us know!  
Happy Building! 🙂

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [January 23, 2018, 4:53pm UTC](https://discuss.bitrise.io/t/how-to-stop-running-ci-build-in-specific-workflow/3851/3 "2018-01-23T16:53:48Z")

</div>

Ohh, and if you’d want an actual command line solution, feel free to create a #feature-request ! We’re not against that, there was just no request / use case so far 😉

---

<div class="post-metadata">

**Author:** ![jahanvi\_vyas](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jahanvi\_vyas](https://discuss.bitrise.io/u/jahanvi_vyas)\
**Post date:** [January 24, 2018, 4:39pm UTC](https://discuss.bitrise.io/t/how-to-stop-running-ci-build-in-specific-workflow/3851/4 "2018-01-24T16:39:57Z")

</div>

Thanks for the quick reply viktorbenei! I will create feature-request.
