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 Pipe. This native integration allows you to automatically upload and execute your Flows on enterprise-grade infrastructure directly from your CI/CD pipeline.
Setup environment variables
To authenticate with Maestro Cloud, you must add your credentials as secret variables in Bitbucket.
On Bitbucket, navigate to your Repository → Repository settings → Repository Variables.
Add the following secured variables:
MDEV_API_KEY: Your Maestro Cloud API Key.MDEV_PROJECT_ID: Your specific Maestro Project ID.
Organize your Flows
Maestro expects your Flow files to be located in a specific directory (.maestro/) at the root of your repository.
Create a
.maestro/directory at your repository root.Place all Flow files directly inside
.maestro/to be executed as a standalone test.Place all "utility" Flows (those used by
runFlow) in asubflows/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 FlowAdd the Maestro Cloud Pipe
Update your bitbucket-pipelines.yml file to include the Maestro Cloud Upload Pipe. This step should occur immediately after your app has successfully built.
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.apkscript:
- 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_name>.appOnce 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
0on success or1if 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:
Configure the operating system for your runs to match your application and dependency requirements.
Define locales and time zones to ensure consistent behavior across environments and regions.
Explore all the subcommand options for
claud.
Last updated