Build Pipelines: efficient CI/CD workflows with parallelization

Now in beta: break your Workflows into Stages, build and test in parallel, shard your tests, and get faster PR feedback.

Now in beta: break your Workflows into Stages, build and test in parallel, shard your tests, and get faster PR feedback.

How will Build Pipelines help your app’s complex build structures?

By breaking your Workflows into Stages and Pipelines, you will

  • receive faster PR feedback and debugging becomes easier
  • be able to set up more complex structures with easy parallelization
  • have a better overview of parallel builds
  • be able to divide tests into separate Workflows (test sharding)
  • save time and credits with 'partial rebuild'

What is Build Pipelines?

A Bitrise Pipeline is the top level of our CI/CD configuration. Pipelines can be used to organize the entire CI/CD process and to set up advanced configurations with multiple tasks running parallel and/or sequentially. (Earlier, we suggested using Build Fanning. Build Pipelines is now the official, supported way to achieve the same goals.)

A Pipeline’s building blocks are Steps and Workflows, with Workflows arranged in Stages. Workflows in each Stage run in parallel and Stages run sequentially.

If all Workflows are successful in a Stage, the Pipeline moves on to the next Stage. If any of the Workflows fail or is aborted, the Pipeline ends without running the other Stages unless you configure a given Stage to always run.

After fixing the issues, the failed/aborted one and the subsequent ones (or the entire Pipeline) can be rerun.

When returning to your Dashboard, you’ll be able to differentiate between builds that are standalone or part of a Pipeline:

Fix failed builds faster with partial rebuild

In Build Pipelines is that artifact sharing becomes easier: if you build your app once for testing, you can run any number of tests on the same artifact, in parallel Workflows. (See the ‘Artifact pull’ Step below.) In case of a failed build, you can rebuild the failed and subsequent ones, in 30 days following the first build.

In the screenshot above, in the Stage called ‘build_tests', the test artifact is created, then in the Stage called 'run_tests_on_simulators’, 3 different tests run on the same artifacts.

Using the Rebuild unsuccessful Workflows will create a new attempt for the same Pipeline and not create a new build. You can easily switch between these attempts via the Attempt selector.

Try Build Pipelines now!

At the moment, no visual Pipeline editor is available, Build Pipelines can be set up and configured in YAML only. The YAML files can be either on Bitrise or your repo, but you can edit Workflows as usual.

We’ll introduce Build Pipelines with all the details of the feature and the use cases during a live webinar on 27 July. Register now.

See our documentation with all the details here.

Try setting up a Pipeline with a sample iOS app

Use this Sample iOS app to try Build Pipelines without changing anything in your mobile app’s YML.

Add the sample app to Bitrise

  1. Visit the Create New App page to create a new App.
  2. When prompted to select a git repository, choose Other/Manual and paste the sample project repository URL (https://github.com/bitrise-io/sample-swift-project-with-parallel-ui-test) in the Git repository (clone) URL field.
  3. Confirm that this is a public repository in the resulting pop-up.
  4. Select the ‘master’ branch to scan and any of the offered Distribution methods (for example development, it does not really matter as now we are focusing on testing).
  5. Confirm the offered stack, skip choosing the app icon and the webhook registration and kick off the first build.
  6. Open the new Bitrise project’s Workflow Editor’s bitrise.yml tab and replace the YML there with this bitrise.yml
  7. Go to your app’s page and click the Start/Schedule a Build button, and select the run_tests_on_simulators option in the “Workflow, Pipeline” dropdown menu at the bottom of the popup.

Editing Workflows

Once the Pipeline is set up, you can edit the Workflows in them the usual way:

New Step alert: 'rerun tests without rebuilding' and 'artifact pull'

Both for iOS and Android apps, we’ve created Steps that will build artifacts for testing and tests without building. For example, you can generate an artifact in Stage one, then run any number of tests in Workflows in Stage 2, using that artifact.

Artifact pull Step

This step can be used to pull artifacts of a pipeline: it will download the artifacts generated in the previous stage(s) to the Workflow of the Step.

Xcode test without building (for iOS)

To pair up with the ‘Xcode Build for testing for iOS' Step, we’ve just released the ‘Xcode test without building’ Step, which requires a generated test artifact.

Android Instrumented Test (Android)

You can build your app with 'Android Build for UI testing':

And then run the 'Android Instrumented Test' Step, which requires a previously generated APK to run the tests on them.

Workflow Recipes for common use cases

Workflow Recipes are prewritten YML files to help you set up your Workflows and Stages for your Pipelines. Each Recipe is preconfigured for a use case. You can copy and paste them into your app’s bitrise.yml

For iOS:

For Android:

An unofficial Pipeline editor

If you’d rather use a visual Pipeline editor, you can try an unofficial editor written by Damien Murphy, Solutions Architect at Bitrise.  Thie editor is not officially maintained by Bitrise and can be found here.

Watch the live webinar

Watch Damien Murphy (Solutions Architect), Ákos Birmacher (Product Manager) and Anna Bátki (Product Marketer) introduce Build Pipelines with all the details of the feature and the use cases, followed by a Q&A.

Help us make Build Pipelines better!

Build Pipelines is currently in open beta on credit-based plans. This means that not all planned functions are available and several features will be introduced later to make sure we cover as many use cases as possible. We are collecting your feedback to deliver the best possible feature set for the stable version.

Try Build Pipelines now and tell us how it goes:

  • if you find bugs and errors, submit a ticket
  • for feature requests and feedback, join our Discuss forum
  • answer our surveys when they pop up on Bitrise

Happy building!

No items found.

Explore more topics

App development

Best practices from engineers on how to use Bitrise to build better apps, faster.

Community

Meet other Bitrise engineers, technology experts, power users, partners and join our BUGs.

Company

All the updates about Bitrise events, sponsorships, employees, and more.

Insights

Mobile development, latest tech, industry insights, and interviews with experts.

Mobile DevOps

Learn why mobile development is unique and requires a set of unique practices.

Releases

Stay tuned for the last updates, new features, and product improvements.

Get the latest from Bitrise

Join other Mobile DevOps engineers who receive regular emails from Bitrise, filled with tips, news, and best practices.