Инструменты Firebase: получение ошибки 404 при попытке развернуть в firebase через Google Cloud Build с приложением Angular

Недавно я посмотрел это видео о том, как опубликовать приложение Angular с проектом firebase-tools с помощью Google Cloud Build. .

Таким образом, триггер сборки работает, но он всегда не выполняет последний шаг, а именно развертывание проекта в firebase.

Журнал с последнего шага:

ERROR: build step 4 "gcr.io/(PROJECT_ID)/firebase" failed: exit status 1
ERROR
Finished Step #4
Step #4: Error: HTTP Error: 404, Method not found.
Step #4: 
Step #4: i functions: ensuring necessary APIs are enabled...
Step #4: ✔ firestore: rules file firestore.rules compiled successfully
Step #4: i firestore: reading indexes from firestore.indexes.json...
Step #4: i firestore: checking firestore.rules for compilation errors...
Step #4: ✔ storage: rules file storage.rules compiled successfully
Step #4: i storage: checking storage.rules for compilation errors...
Step #4: ✔ functions: Finished running predeploy script.
Step #4: 
Step #4: > tsc
Step #4: > functions@ build /workspace/functions
Step #4: 
Step #4: Running command: npm --prefix "$RESOURCE_DIR" run build
Step #4: 
Step #4: > tslint --project tsconfig.json
Step #4: > functions@ lint /workspace/functions
Step #4: 
Step #4: Running command: npm --prefix "$RESOURCE_DIR" run lint
Step #4: i deploying storage, firestore, functions, hosting
Step #4: 
Step #4: === Deploying to '(PROJECT_ID)'...
Step #4: 
Step #4: Already have image (with digest): gcr.io/(PROJECT_ID)/firebase
Starting Step #4

Мой файл firebase.json:

{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint",
      "npm --prefix \"$RESOURCE_DIR\" run build"
    ],
    "source": "functions"
  },
  "hosting": {
    "public": "dist/airoc-ui-module-test",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },
  "storage": {
    "rules": "storage.rules"
  }
}

И файл cloudbuild.yaml

steps:
  #Install root
  - name: 'gcr.io/cloud-builders/npm'
    args: ['install']

  #Install functions
  - name: 'gcr.io/cloud-builders/npm'
    args: ['install']
    dir: 'functions/'

  #Build
  - name: 'gcr.io/cloud-builders/npm'
    args: ['run', 'build']

  #Deploy
  - name: 'gcr.io/$PROJECT_ID/firebase'
    args: ['deploy']

person Matthijs Eikelenboom    schedule 25.03.2019    source источник
comment
Пожалуйста, посмотрите мой ответ на следующей странице. stackoverflow.com/questions/55754674/   -  person zkohi    schedule 19.04.2019
comment
@zkohi, ваш ответ относится к 403. Это, вероятно, отличается от 404, которое испытывает OP.   -  person bygrace    schedule 07.06.2019
comment
@bygrace Я знаю. Я показал свой способ настройки только в качестве образца, если это поможет.   -  person zkohi    schedule 08.06.2019
comment
Для меня это было связано с разрешениями (404 вводил в заблуждение). Предоставление администратору Firebase учетной записи службы облачной сборки позволило мне развернуть хостинг и firestore, но я получил 404 для функций. Если вы используете токен ci, он работает.   -  person bygrace    schedule 09.06.2019