基于先前字符串参数的动态参数 [英] Dynamic parameter based on previous string parameter
问题描述
在Jenkins中,我有一个字符串参数 HOST .在此参数之后,我有一个动态参数 URL .此参数必须是字符串的串联,包括先前定义的 HOST 参数.
我一直不知道该怎么做.
这样做的动机是后续参数也将使用此 HOST 参数.
请确保我正确理解您的要求:您有两个参数,后一个取决于第一个参数的值?
如果是这样,我认为
- 以指定的值构建:
- 构建结果:
- 如果在构建时更改
HOST
的值,则URL
也会更改.
希望这会有所帮助:-)
In Jenkins I have a string parameter HOST. After this parameter I have a dynamic parameter URL. This parameter needs to be a concatenation of strings, including the previously defined HOST parameter.
I have been unable to find out how to do this.
The motivation for this is subsequent parameters will also use this HOST parameter.
Just make sure I understand your requirement correctly: you have two parameters and the later one is depends on the value of the first one?
If it's so I think plugin Parameterized Build is enough for this:
- Job configuration:
- Build with specified value:
- Build result:
- If you change your
HOST
value at build, theURL
will also changed.
Hope this helps :-)
这篇关于基于先前字符串参数的动态参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!