Review Apps for Mobile Setup Instructions
IMPORTANT: Please keep in mind this feature is still in early development and should be considered an alpha feature. Please report any problems or feedback in this issue, and subscribe to this issue for future updates.
Review Apps for Mobile
The goal of Review Apps for Mobile is to provide a way for teams to preview and collaborate on work all from within the Merge Request by leveraging the existing review apps capabilities in GitLab.
The current implementation leverages Appetize.io to provide Android and iOS emulators in the browser. An Appetize account is required to use this feature.
Setup Instructions
Video Walkthrough
There are two steps required to set up this feature; connecting an Appetize account, and updating the pipeline configuration.
-
Connect an Appetize account
In your Appetize account, request an API token from https://appetize.io/account. Once you have your token, go over to your GitLab project, and go to Settings > CI/CD > Variables. Create a new variable called
APPETIZE_API_TOKEN
and assign it the value of your Appetize token. -
Update the pipeline configuration
There are 3 things you'll need to change in your pipeline configuration to enable Review Apps for Mobile. In the project's
.gitlab-ci.yml
file, make the following changes:Include the CI template for your platform:
Android:
include: remote: https://gitlab.com/gitlab-org/incubation-engineering/devops-for-mobile-apps/demo-mobile-ci-templates/-/raw/main/Android-Mobile-Review-App.gitlab-ci.yml
iOS:
include: remote: https://gitlab.com/gitlab-org/incubation-engineering/devops-for-mobile-apps/demo-mobile-ci-templates/-/raw/main/iOS-Mobile-Review-App.gitlab-ci.yml
Set a variable to point to your app's artifact
This is the artifact generated in the build step. It should be either an APK for Android or a ZIP file for iOS
variables: REVIEW_APP_ARTIFACT_PATH: "app/build/outputs/apk/debug/app-debug.apk"
Add the
startReview
stage to your pipeline definition in the appropriate place (after the artifact has been built)stages: - build - test - startReview
Once these changes are complete, Review Apps for Mobile will be enabled for your project. It's usually best to make these changes in a merge request since it will allow you to test the feature right away. For a full example, please see this merge request: https://gitlab.com/gitlab-org/incubation-engineering/devops-for-mobile-apps/weatherapp/-/merge_requests/4.
Note: for iOS, depending on how your artifacts are set up, you may need to add an additional step to create the zip file needed for Appetize. Please see this merge request for an example of how this can be done: https://gitlab.com/gitlab-org/incubation-engineering/devops-for-mobile-apps/xkcdy/-/merge_requests/2.