我想在 Jenkins 管道的环境标签/正文中定义一个字符串数组。这似乎不起作用;jenkins 无法识别该数组。
环境变量值必须是单引号、双引号或函数调用。@ 第 x 行,第 y 列。我的数组= [
pipeline {
agent {
label 'Test'
}
environment {
myArray = [
"Item1",
"Item2",
"Item3"
]
}
}
下一个代码似乎有效,但我想在环境标签中包含所有字段/设置。
def myArray = [
"Item1",
"Item2",
"Item3"
]
pipeline {
agent {
label 'Test'
}
environment {
}
}