在jenkinsfile中使用主动选择反应参数

时间:2019-03-19 12:13:43

标签: jenkins jenkins-pipeline jenkins-plugins

我正在使用活动选择反应性参数,我想访问jenkinsfile中的选定值。

Environment settings

Active choice reactive parameter

Referencing environment settings

有什么方法可以访问jenkinsfile中的select_server?因为我尝试了${select_server},但没有用。

1 个答案:

答案 0 :(得分:0)

After spending some time on this, I found a way of accessing it in jenkinsfile. the reactive choice parameter could simply be accessed by doing

 ${params.Select_Server} 

In my example the name of the paramter is "Select_Server". Maybe this could help someone in the future