问题
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