Dan*_*yle 6 google-app-engine gcloud google-cloud-build cloudbuild.yaml
问候 stackoverflow 社区!第一次提问,长期用户。
我正在使用 Cloud Build Local 组件和 Secret Manager 在本地测试我的 cloudbuild.yaml 文件,但它在“availableSecrets”上失败。
错误消息:加载配置文件时出错:cloudbuild.Build 中的未知字段“availableSecrets”
有关 Cloud Build 构建文件的文档:https://cloud.google.com/cloud-build/docs/build-config 使用云构建配置机密的文档:https://cloud.google.com/cloud-build/docs/ secure-builds/use-secrets 云构建本地文档: https: //cloud.google.com/cloud-build/docs/build-debug-locally
执行的步骤:
命令:cloud-build-local --config=cloudbuild.staging.yaml --dryrun=false .
cloudbuild.staging.yaml:
- name: gcr.io/cloud-builders/npm
entrypoint: 'npm'
args: [ 'install' ]
- name: 'gcr.io/cloud-builders/gcloud'
args: ["app", "deploy"]
env:
- 'DAO_FACTORY=datastore'
- 'POLL_INTERVAL=15'
- 'PROMPT=staging>'
- 'ENVIRONMENT=staging'
- 'NAMESPACE=staging'
- 'RESET_DATASTORE=false'
secretEnv: ['ADMIN_USER', 'SUPER_ADMINS', 'BOT_TOKEN']
availableSecrets:
secretManager:
- versionName: projects/{project token}/secrets/SYSTEM_USER/versions/1
env: 'ADMIN_USER'
- versionName: projects/{project token}/secrets/SUPER_ADMINS/versions/1
env: 'SUPER_ADMINS'
- versionName: projects/{project token}/secrets/BOT_TOKEN/versions/2
env: 'BOT_TOKEN'```
Tag: cloud-build-local. I guess without reputation a meaningful tag cannot be created. Maybe an esteemed community member will create this as this may be specific to cloud-build-local only.
Run Code Online (Sandbox Code Playgroud)
Google Cloud Build 描述符文件中对 Google Secret Manager 的支持显然是非常新的,目前 cloud-build-local 组件似乎不支持;请参阅 Guillaume 关于该功能已发布一周的评论。当云构建描述符在 Cloud Build 中运行时,它工作正常。
| 归档时间: |
|
| 查看次数: |
1898 次 |
| 最近记录: |