Google cloud platform 谷歌云构建错误无活动项目

Google cloud platform 谷歌云构建错误无活动项目,google-cloud-platform,firebase-hosting,google-cloud-build,Google Cloud Platform,Firebase Hosting,Google Cloud Build,我正在尝试使用firebase上托管的一个非常简单的项目来建立Google Cloud Build,但每次它进入部署阶段时,它都会告诉我: Error: No project active, but project aliases are available. Step #2: Run firebase use <alias> with one of these options: ERROR: build step 2 "gcr.io/host-test-xxxxx/f

我正在尝试使用firebase上托管的一个非常简单的项目来建立Google Cloud Build,但每次它进入部署阶段时,它都会告诉我:

Error: No project active, but project aliases are available.

Step #2: Run firebase use <alias> with one of these options:

ERROR: build step 2 "gcr.io/host-test-xxxxx/firebase" failed: step exited with non-zero status: 1
我对我的cloud builder服务有firebase管理员和API密钥管理员权限,我还想加密,所以我有cloud KMS加密密钥解密程序

我知道

要在我的终端中生成令牌并将其粘贴到my.env变量,然后生成名为production和do的别名

firebase use production
我的yaml是:

steps:
# Install
- name: 'gcr.io/cloud-builders/npm'
  args: ['install']
# Build
- name: 'gcr.io/cloud-builders/npm'
  args: ['run', 'build']
# Deploy
- name: 'gcr.io/host-test-xxxxx/firebase'
  args: ['deploy']
安装和建造工作良好。这里发生了什么

重新运行firebase init似乎没有帮助

更新:


本地构建然后执行firebase部署也没有帮助。

好的,有效的方法是将.firebasesrc文件更改为:

{
  "projects": {
    "default": "host-test-xxxxx"
  }
}

并添加一个名为default的别名

steps:
# Install
- name: 'gcr.io/cloud-builders/npm'
  args: ['install']
# Build
- name: 'gcr.io/cloud-builders/npm'
  args: ['run', 'build']
# Deploy
- name: 'gcr.io/host-test-xxxxx/firebase'
  args: ['deploy']
{
  "projects": {
    "default": "host-test-xxxxx"
  }
}
firebase use --add