2016-09-30 14 views
1

Groovyスクリプトのすべての選択肢を選択して、すべてデフォルトにします。私は前のオプションで読んでいるので、Active Choices Reactive Parameterを使用しています。どのように私は "出力"変数をすべて選択して、それらを選択せず​​にすべての変数を作るのですか?Jenkins Groovyのすべての選択肢を選択してください

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 

答えて

2

私はジェンキンスについて何も知らないが、the documentation for the plugin you mentionを読むことは、単にoutput.add("${newName2}:selected")を使用することができるはずです。

+0

ありがとうございます。これは助けになり、私はそれを働かせました。 –

+0

これはうれしかったです。あなたは答えを受け入れることができますか? – sensei

関連する問題