无法使用Cloudbuild部署Google API GATWAY

问题描述

我正在尝试在云功能之上部署API网关。对于CI / CD,我有cloudbuild,该项目已经在该项目中正常运行。

我从本地计算机运行了gcloud API GATEWAY命令,并且API网关已成功部署。

现在,我在cloudbuild.yaml中编写了这些命令,它抛出“内部服务器错误”,并且在stacktrace上没有进一步的日志。

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

enter image description here

有没有一种调试方法

如何使用cloudbuild部署我的API网关?

openpsec.yaml是上面链接中提到的api网关配置。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)