As part of our ongoing efforts to improve the mobile developer workflow, we've added new options for managing mobile builds in the mabl CLI! Use the mabl CLI to:
- Upload a new build file
- Create a deployment event with build file overrides
- Update scheduled plan runs to use a new build file
Before using new commands, install and configure mabl CLI as described in this article. If you're already using the mabl CLI, make sure it's up to date by running npm
i -g @mablhq/mabl-cli
.
Upload new build file
Before using a build file in cloud runs, you need to upload it to mabl using the mabl mobile-build-files upload
command:
mabl mobile-build-files upload <build-file-path>
Once the file is uploaded, the mabl CLI will output the ID assigned to this new file, which you can use in subsequent CLI commands.
For more information about CLI commands to manage mobile builds, see this article.
Create a deployment event with build file overrides
To test out your plans with a new build file, use the mabl deployments create
command to trigger a deployment event with a build file override. Build file override arguments are separate for Android and iOS platforms:
- For Android, use the
--android-app-file-id
flag - For iOS, use the
--ios-app-file-id
flag
mabl deployments create --application-id <id> --environment-id <environment id> --android-app-file-id <new build file id> --labels regression
For additional information about the deployment command, see this article.
Update scheduled plan runs to use the new build file
If you would like to change the mobile build that scheduled plan runs use, use the mabl environments build-files update
command.
mabl environments build-files update --application-id <id> --build-file-id <new build file id> <environment id>
The CLI will update the build associated with the application-environment pair, as well as in the plan details view.
Viewing a build file associated with an application-environment pair
For additional information about managing build files for your test environments, see this article.