Skip to main content

Rebuilding a failed build

Abstract

If a Bitrise build fails, you can rebuild any time to quickly recover from any errors. You can rebuild either single Workflows or an entire Pipeline.

If a build fails, you can rebuild any time to quickly recover from any errors. You can rebuild either single Workflows or an entire Pipeline. A rebuild always uses the current configuration YAML file: if a build fails and then you modify your configuration and rebuild, the rebuild will run with the new configuration.

Rerunning a failed Workflow build

You can rebuild a failed Workflow at any time. Rebuilding means immediately launching a new build with the current configuration YAML file.

  1. Open Bitrise CI and find your project's build page.

  2. On the top right corner, click Rebuild.

    Remote access

    You can also rebuild with remote access: click the downward arrow to open the dropdown menu and click Rebuild with Remote Access. To find out more: Remote access

Rebuilding a failed Pipeline

Abstract

You can rebuild an entire Pipeline or certain parts of it at any time. The Pipeline build page shows the status of every Workflow in your Pipeline when a build is running. If a Workflow fails, you can save time by re-running the failed Workflow instead of the whole Pipeline.

You can rebuild an entire Pipeline or certain parts of it at any time. The Pipeline build page shows the status of every Workflow in your Pipeline when a build is running. If a Workflow fails, you can save time by re-running the failed Workflow instead of the whole Pipeline.

Rebuilding a failed Pipeline

You can rebuild a Pipeline either in full or its unsuccessful Workflows with the click of a button:

  1. Open Bitrise CI.

  2. Click a finished Pipeline build for your project.

  3. On the Pipeline summary screen, click Rebuild to bring up the rebuild dropdown menu.

  4. Select an option:

    • Rebuild unsuccessful Workflows: This option only rebuilds the Workflows that failed. This option might not be available for variant Workflows using the parallel property: Rebuilding Pipelines using different Workflow variants.

    • Rebuild the entire Pipeline: This option rebuilds the entire Pipeline from start to finish.

    • Rebuild unsuccessful Workflows with remote access: Remote access allows you to access the build machine remotely while the build is running: Remote access.

    • Rebuild entire Pipeline with remote access: See above.

Rebuilding a Pipeline from a failed Workflow

You can rebuild a Pipeline from a specific failed Workflow. This will rebuild all Workflows that come after the failed Workflow in the Pipeline.

This option might not be available for variant Workflows using the parallel property: Rebuilding Pipelines using different Workflow variants.

  1. Open Bitrise CI.

  2. Click a finished Pipeline build for your project.

  3. Scroll down to the graph of the Pipeline.

  4. Find the failed Workflow and hover over it on the right of the card.

  5. Click the Rebuild from here button.

Rebuilding Pipelines using different Workflow variants

If your Pipelines use different variants of the same Workflow(s) with the parallel property, the available rebuild options depend on the Environment Variable defining the number of parallel runs.

  • If the Workflow which sets the number of parallel runs has already finished during the failed build, you have to rebuild the whole Pipeline.

  • If the number hasn't been set yet during the build, you can use a partial rebuild: either rebuilding from a failed Workflow or rebuild all unsuccessful Workflows.

This is because Bitrise only allows partial rebuilds if the rebuild runs with the same Pipeline configuration as the original build. Two Pipeline configurations are identical if they have the same number of Workflows and the Workflows have the same names. When the parallel count is set, Bitrise has no way of knowing if the number is going to be the same in the rebuild. If the number is different, the two Workflow configurations are also different so a full rebuild is the only option.