首页 > 解决方案 > 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?

标签: shgcloud

解决方案


您是否尝试过重复标志以向自己证明这是否有效?

我认为它没有,你必须使用你的第一个语法。

--xxx在解析命令行参数时,具有重复值的标志和采用奇异值的重复标志之间存在区别,---xxx=A --xxx=B因此通常两者不可互换(尽管希望它们等效是合乎逻辑的)。

你想要这个是因为你试图编写命令并遇到问题吗?


推荐阅读