Add support to reverse trigger for job list
Listing jobs as a comma separated list is fine with small amounts of jobs however when this list gets too long it can be difficult to maintain. This patch adds support to list jobs as a list and the code will automatically change it to a python separated list. Also retains support for the old style comma separated list. Change-Id: I0a419bb1f2ec83979f46990430f874381680cac8 Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
This commit is contained in:
15
tests/triggers/fixtures/reverse-list.xml
Normal file
15
tests/triggers/fixtures/reverse-list.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<triggers class="vector">
|
||||
<jenkins.triggers.ReverseBuildTrigger>
|
||||
<spec/>
|
||||
<upstreamProjects>a,b,c</upstreamProjects>
|
||||
<threshold>
|
||||
<name>FAILURE</name>
|
||||
<ordinal>2</ordinal>
|
||||
<color>RED</color>
|
||||
<completeBuild>true</completeBuild>
|
||||
</threshold>
|
||||
</jenkins.triggers.ReverseBuildTrigger>
|
||||
</triggers>
|
||||
</project>
|
||||
7
tests/triggers/fixtures/reverse-list.yaml
Normal file
7
tests/triggers/fixtures/reverse-list.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
triggers:
|
||||
- reverse:
|
||||
jobs:
|
||||
- 'a'
|
||||
- 'b'
|
||||
- 'c'
|
||||
result: 'failure'
|
||||
Reference in New Issue
Block a user