I am trying to use the Firebase test lab with an android app where the build runs using gradle in a CI environment (
gitlab.com).
Running directly from the command line on my local desktop, it works fine. The command
gcloud firebase test android run --app app/build/outputs/apk/app-pro-debug.apk --test app/build/outputs/apk/app-pro-debug-androidTest.apk
.... results in tests being submitted to the firebase test lab.
However, when trying to get this working in a CI environment, there is a problem with authentication:
ERROR: (gcloud.firebase.test.android.run) Unable to access the test environment catalog: ResponseError 403: Request had insufficient authentication scopes.
The VM on which the build runs has its own authentication (it is a VM that is in the same account as the gcoud account used for firebase)
$ gcloud auth list
Credentialed Accounts:
- XXXXXXXXXXX...@developer.gserviceaccount.com ACTIVE
To set the active account, run:
$ gcloud config set account `ACCOUNT`
where I have replaced the actual account with "XXXXXXXXXXXXXXX"
How do I get the firebase test lab to recognize the VM's credentials as valid for Firebase test?