def loopCount = No_Of_TEST.toInteger()
for (int i = 1; i <= TEST; i++) {
def paramInput = input(
id: "paramInput-${i}",
message: "Enter TEST${i} Value",
parameters: [
string(name: "Control_IP_${i}", defaultValue: '10.0.0.0', description: "Control IP")
]
)
}
字符串
我已经试过了
sh "echo ${params.Control_IP_${i}}"
型
也试过:
env.Control_IP = params["Control_IP_${i}"]
echo "${env.Control_IP}"
型
但是在echo之后得到的是null。
1条答案
按热度按时间nkoocmlb1#
每次重新指定
paramInput
变量params
-存储初始参数而不是动态env
-仅环境变量你可以使用hack:
字符串
取决于你的管道inputParams不能在函数中解析,如果你有任何,所以你需要添加
型
如果您希望使用全局变量