如何在jenkinis UI中将用户输入分配给变量

问题描述 投票:0回答:1

在我的管道中,我希望将用户输入作为变量(黄色方框。jenkins build

我的代码如下:this is how the code looks like.我需要在代码中添加些什么,以便可以将用户输入分配给变量?谢谢

jenkins interactive
1个回答
0
投票

您需要使用参数化的构建插件:https://wiki.jenkins.io/display/JENKINS/Parameterized+Build

您可以添加的位置

enter image description here

并在构建脚本中使用它:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.