Bitbucket Pipelines

Native Bitbucket Pipe for Maestro Cloud. Set API key and Project ID to upload app binary and run Flows on cloud infrastructure.

Integrate Maestro Cloud into your Bitbucket CI/CD workflow using the Maestro Cloud Upload Pipearrow-up-right. This native integration allows you to automatically upload and execute your Flows on enterprise-grade infrastructure directly from your CI/CD pipeline.

circle-info

Maestro Cloud Plan required.

Bitbucket integration is available on the Maestro Cloud Planarrow-up-right.

1

Setup environment variables

To authenticate with Maestro Cloud, you must add your credentials as secret variables in Bitbucket.

  1. On Bitbucket, navigate to your Repository → Repository settings → Repository Variables.

  2. Add the following secured variables:

    • MDEV_API_KEY: Your Maestro Cloud API Key.

    • MDEV_PROJECT_ID: Your specific Maestro Project ID.

circle-info

Access the Maestro Dashboardarrow-up-right to get your API Key and Project ID.

2

Organize your Flows

Maestro expects your Flow files to be located in a specific directory (.maestro/) at the root of your repository.

  1. Create a .maestro/ directory at your repository root.

  2. Place all Flow files directly inside .maestro/ to be executed as a standalone test.

  3. Place all "utility" Flows (those used by runFlow) in a subflows/ subdirectory. This way you prevent these Flows from executing as top-level tests.

<root>
├── .maestro/
│   ├── subflows/
│   │   └── LoginSubFlow.yaml    # Only runs when called via runFlow
│   ├── Login.yaml               # Executed as a top-level Flow
│   ├── Add_to_Cart.yaml         # Executed as a top-level Flow
│   └── Search.yaml              # Executed as a top-level Flow
3

Add the Maestro Cloud Pipe

Update your bitbucket-pipelines.yml file to include the Maestro Cloud Upload Pipearrow-up-right. This step should occur immediately after your app has successfully built.

circle-exclamation
script:
  - pipe: mobiledevinc/maestro-cloud-upload:1.5.0
    variables:
      MDEV_API_KEY: $MDEV_API_KEY
      MDEV_PROJECT_ID: $MDEV_PROJECT_ID
      MDEV_APP_FILE: app/build/outputs/apk/debug/app-debug.apk

Once triggered, the Maestro Cloud Pipe automates the following lifecycle:

  • Uploads your app binary and Flow workspace to Maestro Cloud.

  • Runs your tests on dedicated cloud infrastructure.

  • By default, the pipe waits for all Flows to complete. You can configure this option.

  • Returns an exit code of 0 on success or 1 if failures are detected, allowing you to block builds based on test results.

Next steps

Now that your CI pipeline is connected, consider optimizing your cloud runs:

Last updated