Skip Steps if the previous Step failed or set certain conditions to disable Steps in a given Workflow.
Skipping the Step if the previous Step failed ⚓
You can skip certain Steps in your Bitrise build. There is no point in running, for example, a unit test Step if the previous Step failed to build your app.
Of course, there are examples when it’s better to run a Step even if the previous Step failed. For example, if the Cache:Pull Step fails, there is no reason not to run the next Step - in fact, if the next Step is one that installs dependencies then it’s a very bad idea to skip that Step if pulling the cache is unsuccessful.
To set a given Step to be skipped if the previous Step failed:
- Open your app by clicking on the app’s name on your Dashboard.
Click the Workflow tab to enter the Workflow Editor.
Note that you cannot leave the Workflow Editor without either saving or discarding any changes you made.
- Select the workflow you need in the WORKFLOW dropdown menu on the top left.
- Click the Step you want to skip.
- On the right, use the toggle to disable the Run if previous Step failed option.
Disabling a Step conditionally ⚓
You can also disable a Step by a given condition, or just set it to never run in a specific workflow. The latter can be useful if, for example, you want to keep a Step’s exact configuration but not use the Step itself for a while.
This can only be done in
yaml mode: go to the
bitrise.yml tab in your app’s Workflow Editor and edit the file directly. To read about the specific conditions you can set, check out our Enabling or disabling a Step conditionally guide.
The configuration format of the Bitrise CLI is referred to as bitrise.yml. This is the expected file name the configuration should be saved with.
Creating your own Step is as simple as running a bitrise CLI (v1.6.1+) command and following the guide it prints. You can generate Steps using either the Bash or Go...
The project scanner is a tool that identifies the given project's type and generates a basic Bitrise configuration. Each supported project type has its own scanner: these scanners are stored...