【问题标题】:Integrating FireBase App Distribution with Jenkins - Execution failed for task ':app:appDistributionRelease'将 FireBase 应用程序分发与 Jenkins 集成 - 任务“:app:appDistributionRelease”执行失败
【发布时间】:2020-08-22 05:28:03
【问题描述】:

我是 jenkins 服务器的新手,想为此寻求一些帮助和指导,我目前有一个应用程序正在使用 firebase 应用程序分发功能正常运行和构建,它可以在本地运行,并且可以分发我的应用程序我遵循了他们的设置用这个https://firebase.google.com/docs/app-distribution/android/distribute-gradle?authuser=0#authenticate_using_a_service_account

问题是我想在 jenkins 中自动分发我的应用程序,我已经使用 jenkins 成功构建了一个 apk,但是当我将任务 appDistributionUpload 放在 Gradle Wrapper 任务上时发生了这个错误。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:appDistributionUploadAngelDebug'.
> Could not find credentials. To authenticate, you have a few options: 
  1. Set the `serviceCredentialsFile` property in your gradle plugin
  2. Set a refresh token with the FIREBASE_TOKEN environment variable
  3. Log in with the Firebase CLI
  4. Set service credentials with the GOOGLE_APPLICATION_CREDENTIALS environment variable

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 57s
211 actionable tasks: 209 executed, 2 up-to-date
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Archiving artifacts
Finished: FAILURE

有没有办法可以在我的 Gradle Wrapper 上添加 GOOGLE_APPLICATION_CREDENTIALS 或如何在我的环境变量上设置服务凭据?谢谢

【问题讨论】:

    标签: android firebase jenkins firebase-app-distribution


    【解决方案1】:

    所以您可能没有提交您的应用分发凭据文件。检查您的 .gitignore 文件。

    如果你没有提交文件,实际上你做了一件好事,因为不推荐。但是,无论如何,您都必须在 Jenkins 环境中提供此文件。

    您可以将此文件写入环境变量中。

    【讨论】:

    猜你喜欢
    • 2022-11-06
    • 2020-04-29
    • 2015-02-14
    • 2016-05-13
    • 2015-08-16
    • 2018-11-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多