Passing a parameter to gcloud app via Jenkins

◇◆丶佛笑我妖孽 提交于 2020-03-23 11:33:54

问题


I am using Jenkins to trigger some stuff on gcloud and I need to be able to pass a parameter from the Build with parameters menu to the gcloud command that is being triggered. So let's say my gcloud command is:

gcloud firebase test android run .... --device model=shamu I'd like the passed device model to be a variable. So I tried something like DEVICE_MODEL as parametrized string and stuff like this:

gcloud firebase test android run .... --device model=${DEVICE_MODEL}
gcloud firebase test android run .... --device model=$"DEVICE_MODEL"
gcloud firebase test android run .... --device model=${"DEVICE_MODEL"}

But nothing works.. Any ideas what am I doing wrong?


回答1:


Solved this by using gcloud firebase test android run .... --device model=${DEVICE_MODEL} in Execute Shell as a Build Step instead of a dedicated gcloud build step



来源:https://stackoverflow.com/questions/48974006/passing-a-parameter-to-gcloud-app-via-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!