-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathiterate-a-list.xml
44 lines (43 loc) · 1.18 KB
/
iterate-a-list.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<joblist>
<job>
<defaultTab>summary</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<group>MultilinesRegex</group>
<loglevel>INFO</loglevel>
<name>iterate-a-list</name>
<nodeFilterEditable>false</nodeFilterEditable>
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<plugins>
<LogFilter type='key-value-data-multilines'>
<config>
<hideOutput>false</hideOutput>
<logData>true</logData>
<regex>^\s*(.+?)\s=\s*(.*)</regex>
</config>
</LogFilter>
</plugins>
<script><![CDATA[#Your script here
cat <<-END
some_list = first_element
second_element
third_element
fourth_element
END]]></script>
<scriptargs />
</command>
<command>
<fileExtension>.py</fileExtension>
<script><![CDATA[list="""@data.list@"""
i=0
for line in list.splitlines():
print("checking line %s: %s" % (i,line))
i=i+1]]></script>
<scriptargs />
<scriptinterpreter>python</scriptinterpreter>
</command>
</sequence>
</job>
</joblist>