Google cloud platform 无法使用Cloudbuild部署Google API GATWAY
我正在尝试在云函数之上部署API网关。对于CI/CD,我有cloudbuild,它已经在项目中顺利运行 我从本地计算机运行了gcloud命令,并成功部署了API网关 现在,我在cloudbuild.yaml中编写了这些命令,它抛出了“内部服务器错误”,并且在stacktrace上没有进一步的日志Google cloud platform 无法使用Cloudbuild部署Google API GATWAY,google-cloud-platform,google-api,google-cloud-functions,google-cloud-build,google-cloud-api-gateway,Google Cloud Platform,Google Api,Google Cloud Functions,Google Cloud Build,Google Cloud Api Gateway,我正在尝试在云函数之上部署API网关。对于CI/CD,我有cloudbuild,它已经在项目中顺利运行 我从本地计算机运行了gcloud命令,并成功部署了API网关 现在,我在cloudbuild.yaml中编写了这些命令,它抛出了“内部服务器错误”,并且在stacktrace上没有进一步的日志 steps: - name: 'gcr.io/cloud-builders/gcloud' id: api entrypoint: bash
steps:
- name: 'gcr.io/cloud-builders/gcloud'
id: api
entrypoint: bash
args:
- '-c'
- |
gcloud beta api-gateway apis create api --project=project;
- name: 'gcr.io/cloud-builders/gcloud'
id: api-config
waitFor: ['api']
entrypoint: bash
args:
- '-c'
- |
gcloud beta api-gateway api-configs create api-config --api=api --openapi-spec=openspec.yaml --project=project --backend-auth-service-account=deployment@project-dev.iam.gserviceaccount.com;
- name: 'gcr.io/cloud-builders/gcloud'
id: api-gateway
waitFor: ['api-config']
entrypoint: bash
args:
- '-c'
- |
gcloud beta api-gateway gateways create api-gateway --api=api --api-config=api-config --location=us-central1 --project=project
有办法调试吗
如何使用cloudbuild部署我的API网关
openpsec.yaml是上述链接中提到的api网关配置。很可能是您的云构建服务帐户缺少某些权限,并且由于api网关处于测试版,错误消息无法描述。尝试为测试赋予Cloud Build project owner角色。没有权限问题,但openspec.yaml有一个语法问题,我没有意识到。这个问题已经解决了。