Firebase测试实验室CI上传apks

3

当我设置我的构建服务器使用Firebase测试实验室进行浓缩测试时,我一直遇到这个错误。

ERROR: (gcloud.beta.test.android.run) Permission denied while fetching the default results bucket 
(Error 403: Access Not Configured. Cloud Tool Results API has not been used in project CLOUD_PROJECT_ID before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/toolresults/overview?project=CLOUD_PROJECT_ID then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.).
Is billing enabled for project: [PROJECT_ID]?
当我在自己的电脑上尝试运行以下命令时,它能够正常工作,我的账户已经登录。
gcloud beta test android run \
  --type instrumentation \
  --app app-debug.apk \
  --test app-debug-androidTest.apk \
  --device-ids Nexus4,Nexus5 \
  --os-version-ids 18,21,25 \
  --locales en \
  --orientations portrait
在我的构建服务器上,我想使用一个服务账户,但是当我执行命令时,会出现之前提到的错误。有人知道设置这个的正确方法是什么吗?除了“项目编辑”之外,服务帐户需要特殊角色吗? 在构建脚本中,我执行以下命令进行身份验证和设置项目,然后上传APK文件。
gcloud config set project PROJECT_ID
gcloud auth activate-service-account service-account@email.address --key-file ~/gcloud-service-key.json
2个回答

阿里云服务器只需要99元/年,新老用户同享,点击查看详情
6

最终搞清楚了。如果您想在Firebase测试实验室中使用服务帐户,则必须启用Cloud Tool Results API,而这只能通过Google Cloud控制台启用,而不能通过Firebase控制台。


2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,