summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-05-16 09:30:02 +0000
committerGerrit Code Review <review@openstack.org>2018-05-16 09:30:02 +0000
commit53d100458dd935956241ebdc6e597e5663833e72 (patch)
treeb5f1e8aa3836bf1e15420aedff4f2a64983a96e9
parent2c79678ae74950380315b0fdc4781c40d05ad599 (diff)
parent3913c3e71a4d71f9a30304fc0a07005b38ceb31e (diff)
Merge "Add support for aggregated test results"
-rw-r--r--jenkins_jobs/modules/builders.py11
-rw-r--r--tests/builders/fixtures/multibuild.xml6
-rw-r--r--tests/builders/fixtures/multibuild.yaml1
3 files changed, 14 insertions, 4 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index 3a74185..f2b2fe0 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -1905,6 +1905,8 @@ def multijob(registry, xml_parent, data):
1905 parameters to the other job (optional) 1905 parameters to the other job (optional)
1906 * **abort-all-job** (`bool`) -- Kill allsubs job and the phase job, 1906 * **abort-all-job** (`bool`) -- Kill allsubs job and the phase job,
1907 if this subjob is killed (default false) 1907 if this subjob is killed (default false)
1908 * **aggregate-results** (`bool`) -- Aggregate test results.
1909 (default false)
1908 * **enable-condition** (`str`) -- Condition to run the 1910 * **enable-condition** (`str`) -- Condition to run the
1909 job in groovy script format (optional) 1911 job in groovy script format (optional)
1910 * **kill-phase-on** (`str`) -- Stop the phase execution 1912 * **kill-phase-on** (`str`) -- Stop the phase execution
@@ -1997,10 +1999,11 @@ def multijob(registry, xml_parent, data):
1997 mapping = [('', 'properties', predefined_parameters)] 1999 mapping = [('', 'properties', predefined_parameters)]
1998 convert_mapping_to_xml(param, project, mapping, fail_required=True) 2000 convert_mapping_to_xml(param, project, mapping, fail_required=True)
1999 2001
2000 # Abort all other job 2002 mapping = [
2001 mapping = [('abort-all-job', 'abortAllJob', False)] 2003 ('abort-all-job', 'abortAllJob', False),
2002 convert_mapping_to_xml(phaseJob, 2004 ('aggregate-results', 'aggregatedTestResults', False),
2003 project, mapping, fail_required=True) 2005 ]
2006 convert_mapping_to_xml(phaseJob, project, mapping, fail_required=True)
2004 2007
2005 # Retry job 2008 # Retry job
2006 retry = project.get('retry', False) 2009 retry = project.get('retry', False)
diff --git a/tests/builders/fixtures/multibuild.xml b/tests/builders/fixtures/multibuild.xml
index 2cc75df..907a35f 100644
--- a/tests/builders/fixtures/multibuild.xml
+++ b/tests/builders/fixtures/multibuild.xml
@@ -19,6 +19,7 @@
19 </hudson.plugins.git.GitRevisionBuildParameters> 19 </hudson.plugins.git.GitRevisionBuildParameters>
20 </configs> 20 </configs>
21 <abortAllJob>true</abortAllJob> 21 <abortAllJob>true</abortAllJob>
22 <aggregatedTestResults>false</aggregatedTestResults>
22 <enableRetryStrategy>false</enableRetryStrategy> 23 <enableRetryStrategy>false</enableRetryStrategy>
23 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> 24 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
24 <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> 25 <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
@@ -31,6 +32,7 @@
31 </hudson.plugins.parameterizedtrigger.FileBuildParameters> 32 </hudson.plugins.parameterizedtrigger.FileBuildParameters>
32 </configs> 33 </configs>
33 <abortAllJob>false</abortAllJob> 34 <abortAllJob>false</abortAllJob>
35 <aggregatedTestResults>false</aggregatedTestResults>
34 <enableRetryStrategy>false</enableRetryStrategy> 36 <enableRetryStrategy>false</enableRetryStrategy>
35 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> 37 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
36 </phaseJobs> 38 </phaseJobs>
@@ -50,6 +52,7 @@
50 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters> 52 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
51 </configs> 53 </configs>
52 <abortAllJob>false</abortAllJob> 54 <abortAllJob>false</abortAllJob>
55 <aggregatedTestResults>true</aggregatedTestResults>
53 <enableRetryStrategy>false</enableRetryStrategy> 56 <enableRetryStrategy>false</enableRetryStrategy>
54 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> 57 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
55 <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> 58 <com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
@@ -61,6 +64,7 @@
61 </hudson.plugins.parameterizedtrigger.matrix.MatrixSubsetBuildParameters> 64 </hudson.plugins.parameterizedtrigger.matrix.MatrixSubsetBuildParameters>
62 </configs> 65 </configs>
63 <abortAllJob>false</abortAllJob> 66 <abortAllJob>false</abortAllJob>
67 <aggregatedTestResults>false</aggregatedTestResults>
64 <enableRetryStrategy>false</enableRetryStrategy> 68 <enableRetryStrategy>false</enableRetryStrategy>
65 <enableCondition>true</enableCondition> 69 <enableCondition>true</enableCondition>
66 <condition>${BUILDNUMBER} % 2 == 1</condition> 70 <condition>${BUILDNUMBER} % 2 == 1</condition>
@@ -78,6 +82,7 @@
78 <currParams>true</currParams> 82 <currParams>true</currParams>
79 <configs/> 83 <configs/>
80 <abortAllJob>false</abortAllJob> 84 <abortAllJob>false</abortAllJob>
85 <aggregatedTestResults>false</aggregatedTestResults>
81 <enableRetryStrategy>false</enableRetryStrategy> 86 <enableRetryStrategy>false</enableRetryStrategy>
82 <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition> 87 <killPhaseOnJobResultCondition>FAILURE</killPhaseOnJobResultCondition>
83 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig> 88 </com.tikal.jenkins.plugins.multijob.PhaseJobsConfig>
@@ -93,6 +98,7 @@
93 <currParams>false</currParams> 98 <currParams>false</currParams>
94 <configs/> 99 <configs/>
95 <abortAllJob>false</abortAllJob> 100 <abortAllJob>false</abortAllJob>
101 <aggregatedTestResults>false</aggregatedTestResults>
96 <parsingRulesPath>/PhaseFour/PhaseFourRetry.prop</parsingRulesPath> 102 <parsingRulesPath>/PhaseFour/PhaseFourRetry.prop</parsingRulesPath>
97 <maxRetries>3</maxRetries> 103 <maxRetries>3</maxRetries>
98 <enableRetryStrategy>true</enableRetryStrategy> 104 <enableRetryStrategy>true</enableRetryStrategy>
diff --git a/tests/builders/fixtures/multibuild.yaml b/tests/builders/fixtures/multibuild.yaml
index c43bb29..3fcdf11 100644
--- a/tests/builders/fixtures/multibuild.yaml
+++ b/tests/builders/fixtures/multibuild.yaml
@@ -22,6 +22,7 @@ builders:
22 current-parameters: true 22 current-parameters: true
23 predefined-parameters: foo=bar 23 predefined-parameters: foo=bar
24 node-parameters: true 24 node-parameters: true
25 aggregate-results: true
25 - name: PhaseTwoJobB 26 - name: PhaseTwoJobB
26 current-parameters: false 27 current-parameters: false
27 kill-phase-on: UNSTABLE 28 kill-phase-on: UNSTABLE