通过Jenkins将参数传递给gcloud应用

编程入门 行业动态 更新时间:2024-10-12 10:20:30
本文介绍了通过Jenkins将参数传递给gcloud应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用Jenkins触发gcloud上的某些内容,我需要能够将Build with parameters菜单中的参数传递给要触发的gcloud命令. 因此,假设我的gcloud命令为:

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测试android运行....--device model = shamu 我希望传递的设备模型是一个变量. 所以我尝试了类似的东西 DEVICE_MODEL作为参数化字符串和类似这样的东西:

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?

推荐答案

通过在Execute Shell中将gcloud firebase test android run .... --device model=${DEVICE_MODEL}用作构建步骤而不是专用的gcloud构建步骤来解决了此问题

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

更多推荐

通过Jenkins将参数传递给gcloud应用

本文发布于:2023-11-24 02:22:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623620.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:参数   Jenkins   gcloud

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!