问题标签 [cloudbuild.yaml]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
67 浏览

terraform - Terraform,日志中的奇怪模式 [32m+ [0m

我正在关注官方 GCP 存储库中关于如何从云构建部署 terraform 的本教程:

cloudbuils.yaml

我在日志中有以下模式:

这使得调试变得更加痛苦,我确信这是一个简单的格式问题,但我找不到它的起源。

0 投票
1 回答
28 浏览

google-cloud-build - 如何在 cloudbuild 中使用带有 secretmanager 的自定义替换?

我在 cloudbuild.yaml 中使用自定义替换时遇到问题。

从我从反复试验中可以看出,使用类似$PROJECT_ID的东西代替$_CUSTOM_SUBSTITUTION将运行构建,但如果我使用像上面这样的自定义替换,则在推送提交时触发器根本不会运行构建。

我还测试了各种其他碱基替换,就像$BRANCH_NAME达到同样的效果。我觉得目前在 cloudbuild 中不可能做到这一点?

0 投票
1 回答
53 浏览

google-cloud-platform - 在 gcloud 中将 SECRET KEY 作为环境变量传递

我已经在 GCP 的 Secret manager 中存储了一个密钥,并且我尝试在其中使用该密钥,cloudbuild.yaml但每次出现此错误时:

ERROR: (gcloud.functions.deploy) argument --set-secrets: Secrets value configuration must match the pattern 'SECRET:VERSION' or 'projects/{PROJECT}/secrets/{SECRET}:{VERSION}' or 'projects/{PROJECT}/secrets/{SECRET}/versions/{VERSION}' where VERSION is a number or the label 'latest' [ 'projects/gcp-project/secrets/SECRETKEY/versions/latest' ]]

我的云构建文件如下所示:

我正在阅读文档,但我没有任何其他线索可以帮助我。

0 投票
2 回答
27 浏览

gcloud - Cloudbuild 在构建云运行 docker 容器时无法访问 Artifacts Registery

我在我的云运行 nodejs 容器中使用来自 Artifacts Registery 的包。当我尝试 gcloud builds submit 时,我收到以下错误:

这是我的 cloudbuild.yaml:

和 Dockerfile

.npmrc 文件:

google build 服务帐号已经拥有“Artifact Registry Reader”权限

0 投票
1 回答
10 浏览

google-cloud-platform - GCP cloudbuild react-scripts build 找不到 env.file

我正在做一些我认为很简单的事情:

在我的 package.json 中:

所有这些在本地运行良好,但在 gcp cloud build 中的输出:

我不确定我做错了什么还是 GCP 方面的错误?

0 投票
2 回答
41 浏览

dockerfile - 如何在 docker build 上指定 Dockerfile 的绝对路径

如何在 docker cloud build 作业中指定 -t 和 -f 参数。

我收到以下错误:“docker build”需要 1 个参数”