Skip to main content

Managing Workflows

Abstract

You can chain multiple Workflows, rearrange the order of Workflows in a chain, as well as rename Workflows at any time in the Bitrise Workflow Editor.

You can chain multiple Workflows, rearrange the order of Workflows in a chain, as well as rename Workflows at any time in the Bitrise Workflow Editor.

Offline Workflow Editor

The Workflow Editor is available both online and offline:

The Workflows & Pipelines screen

The Workflows & Pipelines page provides an overview of all your Workflows and Pipelines which are the most fundamental structural elements of your Bitrise configuration.

workflow-and-pipelines.png

To get to the Workflows & Pipelines page, open your app on Bitrise and click the Workflows button. On the page, you can:

  • View the list of all Workflows and Pipelines. For the automatically generated default Workflows, you can also see a brief summary of their function. You can filter for any Workflow or Pipeline by name.Default Workflows

  • Start or schedule a build. You can do so either by clicking the Start/schedule build button or you can find the Workflow or Pipeline you want to build and click the Run a build runbuild.svg button next to their name. In the case of the latter, the start build dialogue window will have the selected Workflow or Pipeline already set. For more information on starting builds, see: Starting builds.

  • Enter the Workflow Editor to create a new Workflow: click the Create Workflow button. For more information about creating Workflows, see Creating a Workflow.

  • Enter the Workflow Editor to edit your selected Workflow by clicking the Edit Workflow edit-webhook.svg next to their name. For a Pipeline, this button takes you to the bitrise.yml tab of the Workflow Editor to edit the app's bitrise.yml configuration file.

  • You can also choose to go the bitrise.yml tab directly: click the Edit bitrise.yml button. Read more about the bitrise.yml file: Basics of bitrise.yml.

If you need additional resources, you can click Help button on the page to read some of our guides to getting started with Bitrise.

Chaining Workflows together

You can set up multiple Workflows to run in succession. The order of these Workflows can be rearranged, new Workflows can be added to the chain and existing Workflows can be removed from it at any time.

Bitrise Start Build Step

Be aware that if you chain Workflows together as described in this guide, all the Workflows will still run on the same virtual machine. However, if you use the Bitrise Start Build Step, each of the triggered Workflows will run on a separate virtual machine: Starting parallel builds with a single trigger.

  1. Open your app on Bitrise.

  2. Click the Workflows button on the main page.

  3. On the Workflows & Pipelines page, find the Workflow you need.

    workflow-and-pipelines.png
  4. Open the Workflow Editor.

  5. Click the ellipsis (...) button to the right of the name of the Workflow.

  6. From the dropdown menu, select Insert Workflow before to chain a Workflow before the currently selected one or select Insert Workflow after to chain a Workflow after the currently selected one.

    Managing Workflows
  7. Click Save in the top right corner.

Example 1. Chaining Workflows in YAML

In this example, we're chaining together three Workflows: test, deploy, and ci, using the before_run and after_run parameters.

workflows:
  test:
    envs:
    - IS_TEST: "true"
    steps:
    # test Steps to run

  deploy:
    before_run:
    - test
    steps:
    # steps to deploy

  ci:
    before_run:
    - test
    after_run:
    - deploy

For more information on how to manage Workflows directly in the bitrise.yml file, check Workflow reference.


Rearranging chained Workflows

Once you have a chain, you can easily rearrange the order of Workflows in a drag-and-drop menu.

  1. Open your app on Bitrise.

  2. Click the Workflows button on the main page.

  3. On the Workflows & Pipelines page, find the Workflow you need.

    workflow-and-pipelines.png
  4. Open the Workflow Editor.

  5. Click the ellipsis (...) button to the right of the name of the Workflow.

  6. From the dropdown menu, select Change Workflow execution orderto bring up a drag-and-drop menu where you can rearrange the Workflows of the chain.

    Managing Workflows
  7. Click Save in the top right corner.

Renaming Workflows

Rename your Workflows at any time you feel necessary: it’s quick and simple.

  1. Open your app on Bitrise.

  2. Click the Workflows button on the main page.

  3. On the Workflows & Pipelines page, find the Workflow you need.

    workflow-and-pipelines.png
  4. Open the Workflow Editor.

  5. Click RENAME next to the name of the Workflow.

  6. Type the new name then click the check mark to save the new name.

  7. Click Save in the top right corner.

Utility Workflows

Bitrise supports a special type of Workflow called a utility Workflow. A utility Workflow's ID always starts with an underscore character: for example, _setup. They are usually used to perform tasks that are required either at the start or at the end of several different Workflows: for example, you can separate git cloning and activating your SSH key into a utility Workflow instead of adding those Steps to every Workflow of an app.

You can create a utility Workflow the exact same way as you create a regular one. To denote it as a utility Workflow, you just need to prefix the name with an underscore.

Utility Workflows cannot run alone

Utility Workflows cannot be run as standalone Workflows. They need to be chained together with a normal Workflow, either before or after the Workflow: Chaining Workflows together.

Example 1. Utility Workflow in YAML

In this example, we have two utility Workflows, called _setup and _send-notifications. They are chained together with two Workflows called test and ci using the before_run and after_run parameters.

workflows:
  _send-notifications:
    steps:
    # send notifications

  _setup:
    steps:
    # setup Steps to run

  test:
    before_run:
    - _setup
    envs:
    - IS_TEST: "true"
    steps:
    # test Steps to run

  ci:
    before_run:
    - test
    after_run:
    - _send-notifications

For more information on how to manage Workflows directly in the bitrise.yml file, check Workflow reference.