Select Jenkins 中的所有选择 Groovy

Select All Choices in Jenkins Groovy

我想 select 我的 Groovy 脚本中的所有选项,所以它默认为全部。我正在使用 Active Choices Reactive Parameter,因为我正在阅读上一个选项。如何使我的 "output" 变量全部 selected 而无需用户 select 他们全部?

def output = []
def line
def release = RELEASE_NUMBER
releaseNumber = release.replaceAll("\n", "");
String[] number = releaseNumber.split("\.");

def list = "cmd /c e:\tools\wget --no-check-certificate --http-user=username--http-password=password-qO- \"https://1.1.1.1:443/svn/Instructions/trunk/${number[0]}.${number[1]}.${number[2]}/ICAN/EI_${releaseNumber}.txt\"".execute().text
list.eachLine {
     if (it.contains("- LH")) {
         String newName = it.replaceAll("\s", "");
         String newName2 = newName.replaceAll("-", "");
         output.add(newName2)
     }
}
return output

我对 Jenkins 一无所知,但阅读 the documentation for the plugin you mention 你应该能够简单地使用 output.add("${newName2}:selected").