【问题标题】:Cannot deploy from GCP Cloud Build to Firebase Hosting无法从 GCP Cloud Build 部署到 Firebase 托管
【发布时间】:2020-06-27 08:06:25
【问题描述】:

我在 GCP 项目中有一个存储库,其中包含我想在 Firebase 中作为托管应用发布的 PWA。我想设置一个触发器,以便每当在分支中完成推送时,它都会在 Firebase 中部署 de PWA。我已经按照 GCP 文档Deploy Firebase 中的步骤进行操作,但我总是遇到授权错误

未能获取 Firebase 项目 ghe-dev-repositories-170-920df。请确保该项目存在并且您的帐户有权访问它。

我已多次检查所有必需的 API 均已启用,并且 @cloudbuild.gserviceaccount.com 帐户具有必需的角色。

我注意到,在创建 Firebase 项目时,Firebase 为该项目提供了一个与 GCP 项目不同的 Id。下面我粘贴cloudbuild.yaml

steps:
  - name: node
    entrypoint: yarn
    args: ["install"]
  - name: gcr.io/cloud-builders/gsutil
    args: ['cp', '${_APP_ENV_PATH}', 'packages/app/.env']
  - name: node
    entrypoint: yarn
    args: ["build"]
  - name: 'gcr.io/${_GCP_PROJECT_ID}/firebase'
    args: ['deploy', '--project=${_TARGET_PROJECT_ID}', '--only=hosting:${_TARGET_ENVIRONMENT}']
timeout: "1600s"

有什么线索吗?

【问题讨论】:

    标签: firebase google-cloud-platform firebase-hosting google-cloud-build


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-14
      • 2021-06-14
      • 2023-02-26
      • 1970-01-01
      • 1970-01-01
      • 2020-05-30
      • 1970-01-01
      • 2019-07-11
      相关资源
      最近更新 更多