sh - Can I use multiple --subtitutions flags in gcloud builds sbmit command?
问题描述
This is what I'm doing right now:
gcloud builds submit ./dist \
--config=./cloudbuild.yaml \
--substitutions=_SUB_1=$VALUE_1,_SUB_2=$VALUE_2,_SUB_3=$VALUE_3 \
--project=$PROJECT_ID
This is what I'd like to do:
--substitutions=_SUB_1=$VALUE_1 \
--substitutions=_SUB_2=$VALUE_2 \
--substitutions=_SUB_3=$VALUE_3 \
Is this allowed?
解决方案
您是否尝试过重复标志以向自己证明这是否有效?
我认为它没有,你必须使用你的第一个语法。
--xxx
在解析命令行参数时,具有重复值的标志和采用奇异值的重复标志之间存在区别,---xxx=A --xxx=B
因此通常两者不可互换(尽管希望它们等效是合乎逻辑的)。
你想要这个是因为你试图编写命令并遇到问题吗?
推荐阅读
- elasticsearch - 将地理边界框扩展 x 英里的计算
- java - Spring Security OAuth 2 资源服务器:为 jwt 验证转换 jwks 不支持 use==enc
- reactjs - Enzyme Shallow 不渲染组件,输出为
- python - 如何从 RPGLE 调用 Python 并返回一个值?
- reactjs - React Router:子组件中定义的路由不起作用
- javascript - 从 Mongoose 获取数据
- angular - 根据ngIf以相同的角度形式禁用提交按钮
- reactjs - 如何在 ExtJs 组件中加载 React 应用程序 / Lib
- javascript - TypeError - Router.use() 需要一个中间件函数但有一个未定义的
- c# - 将 DropdownList 属性绑定到 ASP.NET Core 中的控制器方法