icon

Bitrise Start Build

Starts a new build with the specified Workflow(s).

The Step starts a new build of the same app with specified Workflow(s). On its own, the Step can be used to start multiple builds that run in parallel. In combination with the Bitrise Wait for Build Step, you can also add additional Steps to run in parallel while the triggered builds are running. For an example, check out our Start builds from a parent Workflow Workflow Recipe. You can put this Step in a Workflow that is triggered by a code push or pull request and use this Step to trigger multiple other builds at the same time.

To do that, you need multiple concurrencies - at least two! You also need a Personal Access Token to use the Step: check out our guide on how to generate the token.

If manual build approval is enabled for the project, this step won't be able to start new builds automatically.

Configuring the Step

Before you run a build with this Step, make sure you have your Personal Access Token stored in a Secret Environment Variable.

Note that all builds you trigger using this Step will have the same build number!

  1. Set up at least two Workflows in the Workflow Editor: one will contain the Step, the other will be triggered by the Step. You can set up as many Workflows as you wish: your number of concurrencies limit the number of Workflows you can run simultaneously.
  2. Add the Bitrise Start Build Step to the part of the Workflow where you want to trigger another build.
  3. Add the Secret Env Var storing your Personal Access Token to the Bitrise Access Token input of the Bitrise Start Build Step: click the Select secret variable button, and choose the key you created.
  4. Find the Workflows input of the Bitrise Start Build Step, and add the Workflow(s) you want to run.
  5. In the Environments to share input, add Environment Variables (Env Vars) that you want to share between the builds triggered by the Step.
  6. (Optional) You can set the Wait for builds input to true if you would like to pause the current build until the triggered build(s) are finished.
  7. (Optional) You can add any Step you would like to run in parallel while the triggered Workflow(s) are running in the parent Workflow. Make sure to add the Bitrise Wait for Build Step to the end of Workflow.
  8. Add the Secret Env Var storing your Personal Access Token to the Bitrise Access Token input of the Bitrise Wait for Build Step: click the Select secret variable button, and choose the key you created.
  9. In the Build slugs input, define the builds for the Step. The build slugs you need are stored by the Bitrise Start Build Step in the $ROUTER_STARTED_BUILD_SLUGS Env Var. As long as the builds defined by the slugs are running, the Step will hold the build it is running in. The build will fail if any of the builds included in the Step fail.
  10. Optionally, you can save the build artifacts from the builds and configure the Step to abort all builds if any of the builds fail: - In The path of the build artifacts input, set where you'd like to save the artifacts. The value of the input must be an actual, existing path, ending with /. - Set the Abort all builds if one fails input to either yes or no. Please note that the build artifacts of child Workflows - Workflows triggered by this Step - will be only available if the child Workflow contains a Deploy to Bitrise.io Step.

Troubleshooting

  • Make sure you have both the Bitrise Start Build and the Bitrise Wait for Build Steps in the right place in your initial Workflow.
  • Always check all your builds: if your concurrencies are taken up by other builds, this Step cannot start new ones.
  • Your Personal Access Token can expire! Make sure it's still valid - without it, you can't start new builds with this Step.

Useful links

Related Steps

Similar steps

The Step pauses the current build until another running build is finished.

Activates Bitrise Remote Build Cache for subsequent Bazel builds in the workflows.

Activates Bitrise Remote Build Cache add-on for subsequent Gradle builds in the workflow

Activates Bitrise Remote Build Cache add-on for subsequent Xcode builds in the workflow