You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Deployment Manager创建Cloud Build触发器时提示缺少必填字段的问题求助

使用Deployment Manager创建Cloud Build触发器时提示缺少必填字段的问题求助

大家好,我最近在尝试用Deployment Manager创建Cloud Build触发器,运行下面的gcloud命令时遇到了报错,折腾半天没找到问题所在,来求助各位大佬!

执行的命令:

gcloud deployment-manager deployments create example-config --config deployment.yaml --preview

报错信息如下:

ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-1682857809168-5fa8cddec46b3-3b41bddf-ca76e739]: errors:

  • code: INVALID_CONFIG
    message: 'Invalid config files: Template fetching failed: Type gcp-types/cloudbuild-v1 is not a valid template type, missing required fields.'

我翻了相关文档,但实在搞不清楚到底缺了哪个必填字段。下面是我的配置文件内容:

deployment.yaml

imports:
- path: build-trigger.jinja

resources:
- name: hello-world-triggers
  type: build-trigger.jinja
  properties:
    name: hello-world

build-trigger.jinja

resources:
- name: {{ properties["name"] }}-staging
  type: gcp-types/cloudbuild-v1
  properties:
    resourceName: projects/{{ env["project"] }}/locations/global/triggers/{{ properties["name"] }}-staging
    description: GCF {{ properties["name"] }} staging
    name: {{ properties["name"] }}-staging
    triggerTemplate:
      projectId: {{ env["project"] }}
      repoName: functions
      branchName: ^master$
      invertRegex: true
      includeFiles:
      - {{ properties["name"] }}/**
    filename: {{ properties["name"] }}/cloudbuild.yaml
    eventType: REPO

有没有人能帮我看看哪里出问题了?

备注:内容来源于stack exchange,提问作者Sydney

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 15:53:09