Merge lp:~fginther/cupstream2distro-config/mbs-rebuild-support into lp:cupstream2distro-config

Proposed by Francis Ginther
Status: Merged
Approved by: Martin Mrazik
Approved revision: 304
Merged at revision: 361
Proposed branch: lp:~fginther/cupstream2distro-config/mbs-rebuild-support
Merge into: lp:cupstream2distro-config
Diff against target: 1219 lines (+552/-112)
10 files modified
c2dconfigutils/cu2dUpdateCi.py (+65/-13)
ci/jenkins-templates/mbs-autolanding-config.xml.tmpl (+20/-13)
ci/jenkins-templates/mbs-pbuilder-config.xml.tmpl (+8/-11)
ci/jenkins-templates/mbs-rebuild-config.xml.tmpl (+274/-0)
stacks/head/mir.cfg (+19/-7)
stacks/head/oif.cfg (+9/-5)
stacks/head/unity.cfg (+24/-21)
stacks/raring/oif.cfg (+10/-5)
stacks/raring/unity.cfg (+26/-23)
tests/test_cu2dUpdateCi.py (+97/-14)
To merge this branch: bzr merge lp:~fginther/cupstream2distro-config/mbs-rebuild-support
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Martin Mrazik (community) Approve
Review via email: mp+165698@code.launchpad.net

Commit message

Enables Meta-Build System rebuilds of downstream projects after autolanding the current project.

This includes:
 - A new mbs-rebuild template to define the parent rebuild jobs, the autolanding jobs are reused as the builder jobs.
 - Updates to the mbs templates to reduce the number of jenkins parameters created.
 - A new archive directory structure to support automatic archive naming from the stack name in the future.
 - New MBS support for the head/mir stack
 - Updates to the oif and unity stacks to use this new method

Description of the change

Enables Meta-Build System rebuilds of downstream projects after autolanding the current project.

This includes:
 - A new mbs-rebuild template to define the parent rebuild jobs, the autolanding jobs are reused as the builder jobs.
 - Updates to the mbs templates to reduce the number of jenkins parameters created.
 - A new archive directory structure to support automatic archive naming from the stack name in the future.
 - New MBS support for the head/mir stack
 - Updates to the oif and unity stacks to use this new method

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Mrazik (mrazik) wrote :

Can we strip whitespace from rebuild_job in here (in case somebody specifies rebuild like "job1, job2")?:

46 + for rebuild_job in data.split(','):
47 + rebuild_list.append('-'.join([rebuild_job, 'rebuild']))
48 + ctx['rebuild'] = ','.join(rebuild_list)

The following (needs info only):
795 + rebuild: grail-raring

Would it be too hard to specify only "grail" and the update tool would check the current stack and find out there is a "grail-raring" base job? If it would be too hard maybe we can create a check in the validator for it? This feels a bit error prone/not obvious to me.

Other than that looks good.

review: Needs Fixing
Revision history for this message
Francis Ginther (fginther) wrote :

> Can we strip whitespace from rebuild_job in here (in case somebody specifies
> rebuild like "job1, job2")?:
>
> 46 + for rebuild_job in data.split(','):
> 47 + rebuild_list.append('-'.join([rebuild_job,
> 'rebuild']))
> 48 + ctx['rebuild'] = ','.join(rebuild_list)

Done (revision 298)

> The following (needs info only):
> 795 + rebuild: grail-raring
>
> Would it be too hard to specify only "grail" and the update tool would check
> the current stack and find out there is a "grail-raring" base job? If it would
> be too hard maybe we can create a check in the validator for it? This feels a
> bit error prone/not obvious to me.

I originally thought this was going to be hard, so I left it out. But after taking a second look, I found a way to make it work (revision 300). Now, the user just needs to specify the project name to rebuild if it exists in the same stack. If it's not found, it's treated as an actual rebuild job name.

> Other than that looks good.

Revision history for this message
Martin Mrazik (mrazik) :
review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

Revision 301 added the ability to update the ppa_target when a rebuild occurs. This is only done when both the 'ppa_target' and 'distributions' values are set. The old MBS jobs did this, it was just an oversight. Projects that don't have a ppa_target will still be rebuilt using the local archive.

Revision 302 and 303 updated the mir rebuild targets at the request of thomi.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'c2dconfigutils/cu2dUpdateCi.py'
2--- c2dconfigutils/cu2dUpdateCi.py 2013-05-22 13:12:26 +0000
3+++ c2dconfigutils/cu2dUpdateCi.py 2013-05-29 14:11:26 +0000
4@@ -61,24 +61,28 @@
5 'concurrent_jenkins_builds',
6 'configuration',
7 'contact_email',
8+ 'days_to_keep_builds',
9 'disabled',
10 'fasttrack',
11 'hook_source',
12+ 'irc_notification',
13+ 'irc_channel',
14 'landing_job',
15+ 'local_archive_host',
16+ 'local_archive_login',
17+ 'local_archive_tmp',
18+ 'log_rotator',
19 'node_label',
20+ 'num_to_keep_builds',
21 'parallel_jobs',
22 'postbuild_job',
23 'publish',
24 'publish_coverage',
25 'publish_junit',
26 'priority',
27+ 'rebuild',
28 'team',
29 'use_description_for_commit',
30- 'log_rotator',
31- 'days_to_keep_builds',
32- 'num_to_keep_builds',
33- 'irc_notification',
34- 'irc_channel',
35 ]
36
37 DEFAULT_HOOK_LOCATION = '/tmp/$JOB_NAME-hooks'
38@@ -139,6 +143,22 @@
39 parameter = JobParameter(name, value)
40 ctx['parameter_list'].append(parameter)
41
42+ def get_rebuild_job(self, stack, project_name):
43+ """ Generates the rebuild job name for a project
44+
45+ :param stack: the original stack dictionary
46+ :param project_name: the project name to lookup
47+ :return job_name: the rebuild job name for the requested project
48+ """
49+ try:
50+ project = stack['projects'][project_name]
51+ job_name = '{}-rebuild'.format(
52+ get_ci_base_job_name(project_name, project))
53+ except KeyError:
54+ # Allow for a user specified rebuild job
55+ job_name = project_name
56+ return job_name
57+
58 def process_project_config(self, project_name, project_config,
59 job_data, builder_job=False):
60 """ Generates the template context from a project configuration
61@@ -203,6 +223,16 @@
62 script = self._get_build_script(self.AGGREGATE_TESTS_TEMPLATE,
63 formatting)
64 ctx['aggregate_tests_script'] = script
65+ elif key == 'rebuild':
66+ # Only support manually specified rebuild jobs
67+ if data:
68+ rebuild_list = []
69+ for rebuild_project in data.split(','):
70+ rebuild_job = self.get_rebuild_job(
71+ job_data['stack'], rebuild_project.strip())
72+ rebuild_list.append(rebuild_job)
73+ ctx['rebuild'] = ','.join(rebuild_list)
74+
75 elif key in self.TEMPLATE_CONTEXT_KEYS:
76 # These are added as ctx keys only
77 ctx[key] = data
78@@ -227,13 +257,14 @@
79 self.add_parameter(ctx, 'project_name', project_name)
80 return ctx
81
82- def generate_jobs(self, job_list, project_name, job_type, job_config,
83- job_template, build_template, job_data):
84+ def generate_jobs(self, job_list, project_name, job_type, build_type,
85+ job_config, job_template, build_template, job_data):
86 """ Generates the main job and builder jobs for a given project
87
88 :param job_list: list to hold the generated jobs
89 :param project_name: the project name from the stack definition
90- :param job_type: 'ci' or 'autolanding'
91+ :param job_type: parent job - 'ci', 'autolanding' or 'rebuild'
92+ :param build_type: builder job - 'ci' or 'autolanding'
93 :param job_config: dictionary containing the job definition
94 :param job_template: template used to define the main job
95 :param build_template: template used to define the build jobs
96@@ -266,13 +297,17 @@
97 build_list.append(config_name)
98
99 else:
100+ build_name = '-'.join([job_base_name, config_name,
101+ build_type])
102+ build_list.append(build_name)
103+ if job_type == 'rebuild':
104+ # For rebuild jobs, the autolanding builder jobs will
105+ # be reused. So all that is needed is the build_list.
106+ continue
107 dict_union(build_config, data)
108 ctx = self.process_project_config(project_name,
109 build_config, job_data,
110 builder_job=True)
111- build_name = '-'.join([job_base_name, config_name,
112- job_type])
113- build_list.append(build_name)
114 job_data['build_lookup'][config_name] = build_name
115 job_list.append({'name': build_name,
116 'template': template,
117@@ -297,7 +332,8 @@
118 stack_ppa = stack.get('ppa', False)
119 if stack_ppa == "null":
120 stack_ppa = False
121- job_data = {'stack_ppa': stack_ppa}
122+ job_data = {'stack': stack,
123+ 'stack_ppa': stack_ppa}
124
125 # Merge the default config with the project specific config
126 project_config = copy.deepcopy(stack['ci_default'])
127@@ -305,8 +341,10 @@
128
129 ci_template = None
130 autolanding_template = None
131+ rebuild_template = None
132 ci_only_dict = dict()
133 autolanding_only_dict = dict()
134+ rebuild_only_dict = dict()
135
136 # Extract the ci, autolanding or build specific items to make the
137 # project configuration purely generic.
138@@ -314,10 +352,13 @@
139 ci_only_dict = project_config.pop('ci')
140 if 'autolanding' in project_config:
141 autolanding_only_dict = project_config.pop('autolanding')
142+ rebuild_only_dict = copy.deepcopy(autolanding_only_dict)
143 if 'ci_template' in project_config:
144 ci_template = project_config.pop('ci_template')
145 if 'autolanding_template' in project_config:
146 autolanding_template = project_config.pop('autolanding_template')
147+ if 'rebuild_template' in project_config:
148+ rebuild_template = project_config.pop('rebuild_template')
149 if 'build_template' in project_config:
150 build_template = project_config.pop('build_template')
151
152@@ -326,7 +367,7 @@
153 ci_dict = copy.deepcopy(project_config)
154 if ci_only_dict is not None:
155 dict_union(ci_dict, ci_only_dict)
156- self.generate_jobs(job_list, project_name, 'ci', ci_dict,
157+ self.generate_jobs(job_list, project_name, 'ci', 'ci', ci_dict,
158 ci_template, build_template, job_data)
159
160 # Create autolanding job, add back in the autolanding dict
161@@ -335,9 +376,20 @@
162 if autolanding_only_dict is not None:
163 dict_union(autolanding_dict, autolanding_only_dict)
164 self.generate_jobs(job_list, project_name, 'autolanding',
165+ 'autolanding',
166 autolanding_dict, autolanding_template,
167 build_template, job_data)
168
169+ # Create rebuild job, add in the rebuild dict
170+ if rebuild_template:
171+ rebuild_dict = copy.deepcopy(project_config)
172+ if rebuild_only_dict is not None:
173+ dict_union(rebuild_dict, rebuild_only_dict)
174+ self.generate_jobs(job_list, project_name, 'rebuild',
175+ 'autolanding',
176+ rebuild_dict, rebuild_template,
177+ build_template, job_data)
178+
179 def process_stack(self, job_list, stack, target_project=None):
180 """ Process the projects with the stack
181
182
183=== modified file 'ci/jenkins-templates/mbs-autolanding-config.xml.tmpl'
184--- ci/jenkins-templates/mbs-autolanding-config.xml.tmpl 2013-04-26 16:04:38 +0000
185+++ ci/jenkins-templates/mbs-autolanding-config.xml.tmpl 2013-05-29 14:11:26 +0000
186@@ -54,7 +54,7 @@
187 <configs>
188 <hudson.plugins.parameterizedtrigger.CurrentBuildParameters/>
189 <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
190- <properties>UPSTREAM_BUILD_NUMBER=$BUILD_NUMBER</properties>
191+ <properties>temp_dir={{ local_archive_tmp }}/${local_archive_name}/${project_name}.${BUILD_NUMBER}.autolanding</properties>
192 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
193 </configs>
194 <projects>{{ builder_list }}</projects>
195@@ -85,14 +85,12 @@
196 <command>#!/bin/bash
197 set -x
198
199-temp_dir=${local_archive_tmp}/${project_name}-al-${local_archive_pocket}-${BUILD_NUMBER}
200-ppa_build_number=${BUILD_NUMBER}
201-
202-
203-for p in `ssh ${local_archive_login}@${local_archive_host} ls ${temp_dir}`; do
204- ssh ${local_archive_login}@${local_archive_host} dput -ufU --config /home/ubuntu/.dput.cf ${local_archive} ${temp_dir}/${p}/*.changes
205+temp_dir={{ local_archive_tmp }}/${local_archive_name}/${project_name}.${BUILD_NUMBER}.autolanding
206+
207+for p in `ssh {{ local_archive_login }}@{{ local_archive_host }} ls ${temp_dir}`; do
208+ ssh {{ local_archive_login }}@{{ local_archive_host }} dput -ufU --config /home/ubuntu/.dput.cf ${local_archive_name} ${temp_dir}/${p}/*.changes
209 # Execute mini-dinstall to update the local archive
210- ssh ${local_archive_login}@${local_archive_host} mini-dinstall --no-db --batch --config=&quot;/home/ubuntu/.mini-dinstall-${local_archive}.conf&quot;
211+ ssh {{ local_archive_login }}@{{ local_archive_host }} mini-dinstall --no-db --batch --config=&quot;/home/ubuntu/.mini-dinstall-${local_archive_name}.conf&quot;
212 done</command>
213 </hudson.tasks.Shell>
214 {% if aggregate_tests_script %}
215@@ -234,6 +232,15 @@
216 {% endif %}
217 <hudson.plugins.parameterizedtrigger.BuildTrigger>
218 <configs>
219+{% if rebuild %}
220+ <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
221+ <configs>
222+ </configs>
223+ <projects>{{ rebuild }}</projects>
224+ <condition>SUCCESS</condition>
225+ <triggerWithNoParameters>true</triggerWithNoParameters>
226+ </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
227+{% endif %}
228 <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
229 <configs>
230 <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
231@@ -252,13 +259,13 @@
232 <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
233 <configs>
234 <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
235- <properties>local_archive_host=$local_archive_host
236-local_archive_login=$local_archive_login
237-temp_dir=${local_archive_tmp}/${project}-al-${local_archive_pocket}-${BUILD_NUMBER}</properties>
238+ <properties>local_archive_host={{ local_archive_host }}
239+local_archive_login={{ local_archive_login }}
240+temp_dir={{ local_archive_tmp }}/${local_archive_name}/${project_name}.${BUILD_NUMBER}.autolanding</properties>
241 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
242 </configs>
243- <projects>generic-cleanup-mbs-pt</projects>
244- <condition>UNSTABLE_OR_WORSE</condition>
245+ <projects>generic-cleanup-mbs</projects>
246+ <condition>ALWAYS</condition>
247 <triggerWithNoParameters>false</triggerWithNoParameters>
248 </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
249 </configs>
250
251=== modified file 'ci/jenkins-templates/mbs-pbuilder-config.xml.tmpl'
252--- ci/jenkins-templates/mbs-pbuilder-config.xml.tmpl 2013-05-21 18:18:36 +0000
253+++ ci/jenkins-templates/mbs-pbuilder-config.xml.tmpl 2013-05-29 14:11:26 +0000
254@@ -26,8 +26,8 @@
255 <defaultValue></defaultValue>
256 </hudson.model.StringParameterDefinition>
257 <hudson.model.StringParameterDefinition>
258- <name>UPSTREAM_BUILD_NUMBER</name>
259- <description>Build number of the upstream job used in the tmp directory with the deb output</description>
260+ <name>temp_dir</name>
261+ <description>Temporary directory to store the package artifacts</description>
262 <defaultValue></defaultValue>
263 </hudson.model.StringParameterDefinition>
264 {% for parameter in parameter_list %}
265@@ -69,23 +69,20 @@
266 <hudson.tasks.Shell>
267 <command>#!/bin/bash
268 set -x
269-
270-if [ -z &quot;${autolanding}&quot; ]; then
271- # Build was not triggered by autolanding, don't save the build artifacts
272+if [ -z &quot;${temp_dir}&quot; ]; then
273+ # Build was not triggered by autolanding or rebuild, don't save build artifacts
274 exit 0
275 fi
276
277-tmp_dir=&quot;${local_archive_tmp}/${project_name}-al-${local_archive_pocket}-${UPSTREAM_BUILD_NUMBER}&quot;
278-
279-# mkdir &quot;${tmp_dir}&quot; can fail due to multiple jobs attempting to create the directory
280-ssh ${local_archive_login}@${local_archive_host} mkdir &quot;${tmp_dir}&quot; || true
281-ssh ${local_archive_login}@${local_archive_host} mkdir &quot;${tmp_dir}/${JOB_NAME}&quot;
282+# mkdir &quot;${temp_dir}&quot; can fail due to multiple jobs attempting to create the directory
283+ssh {{ local_archive_login }}@{{ local_archive_host }} mkdir &quot;${temp_dir}&quot; || true
284+ssh {{ local_archive_login }}@{{ local_archive_host }} mkdir &quot;${temp_dir}/${JOB_NAME}&quot;
285
286 # Switch to the output directory containing the build results
287 cd work/output
288
289 # Copy the build results to the temporary holding area, if all jobs succeed, these will be dput into the ppa archive.
290-scp * ${local_archive_login}@${local_archive_host}:${tmp_dir}/${JOB_NAME}</command>
291+scp * {{ local_archive_login }}@{{ local_archive_host }}:${temp_dir}/${JOB_NAME}</command>
292 </hudson.tasks.Shell>
293 </builders>
294 <publishers>
295
296=== added file 'ci/jenkins-templates/mbs-rebuild-config.xml.tmpl'
297--- ci/jenkins-templates/mbs-rebuild-config.xml.tmpl 1970-01-01 00:00:00 +0000
298+++ ci/jenkins-templates/mbs-rebuild-config.xml.tmpl 2013-05-29 14:11:26 +0000
299@@ -0,0 +1,274 @@
300+<?xml version='1.0' encoding='UTF-8'?>
301+<project>
302+ <actions/>
303+ <description>&lt;B&gt;WARNING:&lt;/B&gt; This job is autogenerated. Any changes to the configuration will be lost.&lt;BR&gt;&#xd;
304+&lt;B&gt;PURPOSE:&lt;/B&gt; Autolanding job for {{ target_branch }}&lt;BR&gt;&#xd;
305+&lt;B&gt;TEAM:&lt;/B&gt; {{ team }}&lt;BR&gt;&#xd;
306+&lt;B&gt;POC:&lt;/B&gt; {{ contact_email }}&lt;BR&gt;&#xd;</description>
307+{% if log_rotator %}
308+ <logRotator>
309+ <daysToKeep>{{ log_rotator.days_to_keep_builds }}</daysToKeep>
310+ <numToKeep>{{ log_rotator.num_to_keep_builds }}</numToKeep>
311+ <artifactDaysToKeep>-1</artifactDaysToKeep>
312+ <artifactNumToKeep>-1</artifactNumToKeep>
313+ </logRotator>
314+{% endif %}
315+ <keepDependencies>false</keepDependencies>
316+ <properties>
317+ <hudson.queueSorter.PrioritySorterJobProperty>
318+ <priority>{{ priority }}</priority>
319+ </hudson.queueSorter.PrioritySorterJobProperty>
320+ <hudson.model.ParametersDefinitionProperty>
321+ <parameterDefinitions>
322+ <hudson.model.StringParameterDefinition>
323+ <name>autolanding</name>
324+ <description>Specifies that this is an autolanding/merge job. Used to properly set package version string.</description>
325+ <defaultValue></defaultValue>
326+ </hudson.model.StringParameterDefinition>
327+{% for parameter in parameter_list %}
328+ <hudson.model.StringParameterDefinition>
329+ <name>{{ parameter.name }}</name>
330+ <description>{{ parameter.description }}</description>
331+ <defaultValue>{{ parameter.value }}</defaultValue>
332+ </hudson.model.StringParameterDefinition>
333+{% endfor %}
334+ <hudson.model.BooleanParameterDefinition>
335+ <name>use_description_for_commit</name>
336+ <description>If launchpad commit message is not set in Merge Proposal and you use &quot;usr_description_for_commit&quot; then the description will be used for the merge message (i.e. you will see launchpad description in your bzr log).</description>
337+ <defaultValue>{{ use_description_for_commit }}</defaultValue>
338+ </hudson.model.BooleanParameterDefinition>
339+ </parameterDefinitions>
340+ </hudson.model.ParametersDefinitionProperty>
341+ </properties>
342+ <scm class="hudson.scm.NullSCM"/>
343+ <canRoam>true</canRoam>
344+ <disabled>{{ disabled }}</disabled>
345+ <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
346+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
347+ <triggers class="vector"/>
348+ <concurrentBuild>false</concurrentBuild>
349+ <builders>
350+ <hudson.plugins.parameterizedtrigger.TriggerBuilder>
351+ <configs>
352+ <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
353+ <configs>
354+ <hudson.plugins.parameterizedtrigger.CurrentBuildParameters/>
355+ <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
356+ <properties>temp_dir={{ local_archive_tmp }}/${local_archive_name}/${project_name}.${BUILD_NUMBER}.rebuild
357+landing_candidate=$target_branch</properties>
358+ </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
359+ </configs>
360+ <projects>{{ builder_list }}</projects>
361+ <condition>ALWAYS</condition>
362+ <triggerWithNoParameters>false</triggerWithNoParameters>
363+ <block>
364+ <buildStepFailureThreshold>
365+ <name>FAILURE</name>
366+ <ordinal>2</ordinal>
367+ <color>RED</color>
368+ </buildStepFailureThreshold>
369+ <unstableThreshold>
370+ <name>UNSTABLE</name>
371+ <ordinal>1</ordinal>
372+ <color>YELLOW</color>
373+ </unstableThreshold>
374+ <failureThreshold>
375+ <name>FAILURE</name>
376+ <ordinal>2</ordinal>
377+ <color>RED</color>
378+ </failureThreshold>
379+ </block>
380+ <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
381+ </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
382+ </configs>
383+ </hudson.plugins.parameterizedtrigger.TriggerBuilder>
384+ <hudson.tasks.Shell>
385+ <command>#!/bin/bash
386+set -x
387+
388+temp_dir={{ local_archive_tmp }}/${local_archive_name}/${project_name}.${BUILD_NUMBER}.rebuild
389+
390+
391+for p in `ssh {{ local_archive_login }}@{{ local_archive_host }} ls ${temp_dir}`; do
392+ ssh {{ local_archive_login }}@{{ local_archive_host }} dput -ufU --config /home/ubuntu/.dput.cf ${local_archive_name} ${temp_dir}/${p}/*.changes
393+ # Execute mini-dinstall to update the local archive
394+ ssh {{ local_archive_login }}@{{ local_archive_host }} mini-dinstall --no-db --batch --config=&quot;/home/ubuntu/.mini-dinstall-${local_archive_name}.conf&quot;
395+done</command>
396+ </hudson.tasks.Shell>
397+{% if aggregate_tests_script %}
398+ <hudson.tasks.Shell>
399+ <command>{{ aggregate_tests_script }}</command>
400+ </hudson.tasks.Shell>
401+{% endif %}
402+{% if rebuild %}
403+ <hudson.plugins.parameterizedtrigger.TriggerBuilder>
404+ <configs>
405+ <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
406+ <configs>
407+ </configs>
408+ <projects>{{ rebuild }}</projects>
409+ <condition>ALWAYS</condition>
410+ <triggerWithNoParameters>false</triggerWithNoParameters>
411+ <block>
412+ <buildStepFailureThreshold>
413+ <name>UNSTABLE</name>
414+ <ordinal>1</ordinal>
415+ <color>YELLOW</color>
416+ </buildStepFailureThreshold>
417+ <unstableThreshold>
418+ <name>UNSTABLE</name>
419+ <ordinal>1</ordinal>
420+ <color>YELLOW</color>
421+ </unstableThreshold>
422+ <failureThreshold>
423+ <name>FAILURE</name>
424+ <ordinal>2</ordinal>
425+ <color>RED</color>
426+ </failureThreshold>
427+ </block>
428+ <buildAllNodesWithLabel>false</buildAllNodesWithLabel>
429+ </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
430+ </configs>
431+ </hudson.plugins.parameterizedtrigger.TriggerBuilder>
432+{% endif %}
433+ </builders>
434+ <publishers>
435+{% if aggregate_tests_script %}
436+ {% if archive_artifacts %}
437+ <hudson.tasks.ArtifactArchiver>
438+ <artifacts>{{ archive_artifacts }}</artifacts>
439+ <latestOnly>false</latestOnly>
440+ </hudson.tasks.ArtifactArchiver>
441+ {% endif %}
442+ {% if publish_coverage %}
443+ <hudson.plugins.cobertura.CoberturaPublisher>
444+ <coberturaReportFile>{{ publish_coverage }}</coberturaReportFile>
445+ <onlyStable>false</onlyStable>
446+ <healthyTarget>
447+ <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
448+ <entry>
449+ <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
450+ <int>70</int>
451+ </entry>
452+ <entry>
453+ <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
454+ <int>80</int>
455+ </entry>
456+ <entry>
457+ <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
458+ <int>80</int>
459+ </entry>
460+ </targets>
461+ </healthyTarget>
462+ <unhealthyTarget>
463+ <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
464+ <entry>
465+ <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
466+ <int>0</int>
467+ </entry>
468+ <entry>
469+ <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
470+ <int>0</int>
471+ </entry>
472+ <entry>
473+ <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
474+ <int>0</int>
475+ </entry>
476+ </targets>
477+ </unhealthyTarget>
478+ <failingTarget>
479+ <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
480+ <entry>
481+ <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
482+ <int>0</int>
483+ </entry>
484+ <entry>
485+ <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
486+ <int>0</int>
487+ </entry>
488+ <entry>
489+ <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
490+ <int>0</int>
491+ </entry>
492+ </targets>
493+ </failingTarget>
494+ <sourceEncoding>ASCII</sourceEncoding>
495+ </hudson.plugins.cobertura.CoberturaPublisher>
496+ {% endif %}
497+ {% if publish_junit %}
498+ <hudson.tasks.junit.JUnitResultArchiver>
499+ <testResults>{{ publish_junit }}</testResults>
500+ <keepLongStdio>false</keepLongStdio>
501+ <testDataPublishers/>
502+ </hudson.tasks.junit.JUnitResultArchiver>
503+ {% endif %}
504+{% endif %}
505+{% if contact_email %}
506+ <hudson.tasks.Mailer>
507+ <recipients>{{ contact_email }}</recipients>
508+ <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
509+ <sendToIndividuals>false</sendToIndividuals>
510+ </hudson.tasks.Mailer>
511+{% endif %}
512+{% if irc_channel and irc_notification %}
513+ <hudson.plugins.ircbot.IrcPublisher>
514+ <targets>
515+ <hudson.plugins.im.GroupChatIMMessageTarget>
516+ <name>{{ irc_channel }}</name>
517+ <notificationOnly>true</notificationOnly>
518+ </hudson.plugins.im.GroupChatIMMessageTarget>
519+ </targets>
520+ <strategy>{{ irc_notification }}</strategy>
521+ <notifyOnBuildStart>false</notifyOnBuildStart>
522+ <notifySuspects>false</notifySuspects>
523+ <notifyCulprits>false</notifyCulprits>
524+ <notifyFixers>false</notifyFixers>
525+ <notifyUpstreamCommitters>false</notifyUpstreamCommitters>
526+ <buildToChatNotifier class="hudson.plugins.im.build_notify.DefaultBuildToChatNotifier"/>
527+ <matrixMultiplier>ONLY_CONFIGURATIONS</matrixMultiplier>
528+ <channels/>
529+ </hudson.plugins.ircbot.IrcPublisher>
530+{% endif %}
531+{% if publish %}
532+ <hudson.plugins.build__publisher.BuildPublisher>
533+ <publishUnstableBuilds>true</publishUnstableBuilds>
534+ <publishFailedBuilds>true</publishFailedBuilds>
535+ <postActions class="vector"/>
536+ </hudson.plugins.build__publisher.BuildPublisher>
537+{% endif %}
538+ <hudson.plugins.parameterizedtrigger.BuildTrigger>
539+ <configs>
540+{% if ppa_target and distributions %}
541+ <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
542+ <configs>
543+ <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
544+ <properties>ppa_target=${ppa_target}
545+packaging_branch=${packaging_branch}
546+trunk=${target_branch}
547+distributions=${distributions}
548+version_string_format=${version_string_format}.${BUILD_NUMBER}
549+hook=${dput_hooks}</properties>
550+ </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
551+ </configs>
552+ <projects>generic-dput</projects>
553+ <condition>SUCCESS</condition>
554+ <triggerWithNoParameters>false</triggerWithNoParameters>
555+ </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
556+{% endif %}
557+ <hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
558+ <configs>
559+ <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
560+ <properties>local_archive_host={{ local_archive_host }}
561+local_archive_login={{ local_archive_login }}
562+temp_dir={{ local_archive_tmp }}/${local_archive_name}/${project_name}.${BUILD_NUMBER}.rebuild</properties>
563+ </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
564+ </configs>
565+ <projects>generic-cleanup-mbs</projects>
566+ <condition>ALWAYS</condition>
567+ <triggerWithNoParameters>false</triggerWithNoParameters>
568+ </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
569+ </configs>
570+ </hudson.plugins.parameterizedtrigger.BuildTrigger>
571+ </publishers>
572+ <buildWrappers/>
573+</project>
574
575=== modified file 'stacks/head/mir.cfg'
576--- stacks/head/mir.cfg 2013-05-29 07:50:01 +0000
577+++ stacks/head/mir.cfg 2013-05-29 14:11:26 +0000
578@@ -8,9 +8,20 @@
579 dependencies:
580 - qa
581 ci_default:
582+ autolanding_template: mbs-autolanding-config.xml.tmpl
583+ rebuild_template: mbs-rebuild-config.xml.tmpl
584+ hook_source: lp:~private-ps-quality-team/+junk/mbs-archive-hooks
585+ hooks: H05set_package_version D00mbs_archive
586 configurations:
587 raring-amd64:
588+ template: mbs-pbuilder-config.xml.tmpl
589 node_label: pbuilder
590+ local_archive_host: naartjie
591+ local_archive_login: ubuntu
592+ local_archive_tmp: /home/ubuntu/local-archive
593+ local_archive_name: head.mir
594+ local_archive_source: http://naartjie/archive/
595+ local_archive_pocket: raring
596 build_timeout: 120
597 autolanding:
598 ppa_target: ppa:mir-team/staging
599@@ -19,8 +30,8 @@
600 projects:
601 mir:
602 daily_release: False
603- contact_email: martin.mrazik@canonical.com
604- hooks: H10enable_coverage B10gcovr_run H15enable_testing D10install_valgrind B09copy_results D09add_ppa-phablet-team-ppa
605+ contact_email: martin.mrazik@canonical.com francis.ginther@canonical.com
606+ hooks: H05set_package_version D00mbs_archive H10enable_coverage B10gcovr_run H15enable_testing D10install_valgrind B09copy_results D09add_ppa-phablet-team-ppa
607 archive_artifacts: '**/results/*test*.xml, **/results/coverage.xml, **/output/*deb'
608 publish_coverage: '**/results/coverage.xml'
609 publish_junit: '**/results/*test*.xml'
610@@ -34,13 +45,14 @@
611 template: False
612 mir-android-raring-i386-build:
613 template: False
614+ rebuild: lightdm-mir,unity-system-compositor
615 # TODO irc if autolanding fails
616 qmir:
617 contact_email: martin.mrazik@canonical.com
618 daily_release: False
619 lightdm:
620 contact_email: thomi.richards@canonical.com
621- hooks: H40native_hack.py D08add_ppa-qt5-proper
622+ hooks: H05set_package_version D00mbs_archive H40native_hack.py D08add_ppa-qt5-proper
623 packaging_branch: lp:~lightdm-team/lightdm/trunk-packaging
624 daily_release: False
625 autolanding:
626@@ -48,10 +60,10 @@
627 distributions: precise,quantal,raring,saucy
628 lightdm-mir:
629 target_branch: lp:~mir-team/lightdm/unity
630- contact_email: thomi.richards@canonical.com
631- hooks: D08add_ppa-qt5-proper D09add_ppa-mir-team-staging
632+ contact_email: thomi.richards@canonical.com francis.ginther@canonical.com
633+ hooks: H05set_package_version D00mbs_archive D08add_ppa-qt5-proper D09add_ppa-mir-team-staging
634 daily_release: False
635 unity-system-compositor:
636 daily_release: False
637- contact_email: thomi.richards@canonical.com
638- hooks: D08add_ppa-qt5-proper D09add_ppa-mir-team-staging
639+ contact_email: thomi.richards@canonical.com francis.ginther@canonical.com
640+ hooks: H05set_package_version D00mbs_archive D08add_ppa-qt5-proper D09add_ppa-mir-team-staging
641
642=== modified file 'stacks/head/oif.cfg'
643--- stacks/head/oif.cfg 2013-05-29 07:50:01 +0000
644+++ stacks/head/oif.cfg 2013-05-29 14:11:26 +0000
645@@ -9,8 +9,9 @@
646 contact_email: "francis.ginther@canonical.com"
647 team: PS-QA
648 autolanding_template: mbs-autolanding-config.xml.tmpl
649- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check
650- hook_source: lp:~private-ps-quality-team/+junk/oif-hooks
651+ rebuild_template: mbs-rebuild-config.xml.tmpl
652+ hooks: H05set_package_version D00mbs_archive
653+ hook_source: lp:~private-ps-quality-team/+junk/mbs-archive-hooks
654 configurations:
655 raring-amd64:
656 template: mbs-pbuilder-config.xml.tmpl
657@@ -24,9 +25,9 @@
658 publish_coverage: False
659 local_archive_host: naartjie
660 local_archive_login: ubuntu
661- local_archive_tmp: /home/ubuntu/ppa_archive/oif-staging
662- local_archive: oif-staging
663- local_archive_source: http://naartjie/archive/oif-staging
664+ local_archive_tmp: /home/ubuntu/local-archive
665+ local_archive_name: head.oif
666+ local_archive_source: http://naartjie/archive/
667 local_archive_pocket: raring
668 dependencies:
669 - qa
670@@ -36,6 +37,9 @@
671 tests: unity.tests.test_dash.DashRevealTests.test_alt_f4_close_dash
672 projects:
673 frame:
674+ rebuild: grail
675 geis:
676+ rebuild: libgrip
677 grail:
678+ rebuild: geis
679 libgrip:
680
681=== modified file 'stacks/head/unity.cfg'
682--- stacks/head/unity.cfg 2013-05-29 07:50:01 +0000
683+++ stacks/head/unity.cfg 2013-05-29 14:11:26 +0000
684@@ -9,8 +9,9 @@
685 contact_email: "francis.ginther@canonical.com"
686 team: PS-QA
687 autolanding_template: mbs-autolanding-config.xml.tmpl
688- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check
689- hook_source: lp:~private-ps-quality-team/+junk/mbs-hooks
690+ rebuild_template: mbs-rebuild-config.xml.tmpl
691+ hooks: H05set_package_version D00mbs_archive
692+ hook_source: lp:~private-ps-quality-team/+junk/unity-hooks
693 configurations:
694 raring-amd64:
695 template: mbs-pbuilder-config.xml.tmpl
696@@ -22,11 +23,11 @@
697 template: mbs-pbuilder-config.xml.tmpl
698 node_label: panda-pbuilder
699 publish_coverage: False
700- local_archive: staging
701+ local_archive_name: head.unity
702 local_archive_host: naartjie
703 local_archive_login: ubuntu
704- local_archive_tmp: /home/ubuntu/ppa_archive/staging
705- local_archive_source: http://naartjie/archive/staging
706+ local_archive_tmp: /home/ubuntu/local-archive
707+ local_archive_source: http://naartjie/archive/
708 local_archive_pocket: raring
709 test_parameters:
710 testpackages: unity-autopilot
711@@ -41,24 +42,25 @@
712 - hud
713 projects:
714 dee:
715- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B05xsltproc B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
716+ hooks: H05set_package_version D00mbs_archive D10specifictests B05xsltproc B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
717 archive_artifacts: '**/results/**'
718 publish_coverage: '**/results/coverage.xml'
719 publish_junit: '**/results/*test*xml'
720 configurations:
721 raring-armhf:
722- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B05xsltproc B09copy_results
723+ hooks: H05set_package_version D00mbs_archive D10specifictests B05xsltproc B09copy_results
724 compiz:
725 daily_release: False # remember we don't want to land compiz trunk before activating this one
726 build_timeout: 240
727 archive_artifacts: '**/results/**'
728 publish_coverage: '**/results/coverage.xml'
729 publish_junit: '**/results/*test*xml'
730+ rebuild: unity
731 autolanding:
732- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests_cmake H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov
733+ hooks: H05set_package_version D00mbs_archive B09googletests_cmake H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov
734 configurations:
735 raring-armhf:
736- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests_cmake H15enable_testing D10install_google_test
737+ hooks: H05set_package_version D00mbs_archive B09googletests_cmake H15enable_testing D10install_google_test
738 ci:
739 hooks: D00mbs_archive H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov B09googletests_cmake
740 configurations:
741@@ -69,55 +71,56 @@
742 libunity:
743 libunity-misc:
744 nux:
745- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests B09copy_results D10specifictests H10enable_coverage B10gcovr_run D10install_lcov
746+ hooks: H05set_package_version D00mbs_archive B09googletests B09copy_results D10specifictests H10enable_coverage B10gcovr_run D10install_lcov
747 archive_artifacts: '**/results/**'
748 publish_coverage: '**/results/coverage.xml'
749 publish_junit: '**/results/*test*xml'
750+ rebuild: unity
751 configurations:
752 raring-armhf:
753- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests B09copy_results D10specifictests
754+ hooks: H05set_package_version D00mbs_archive B09googletests B09copy_results D10specifictests
755 unity:
756 build_timeout: 240
757- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10install_google_test H10enable_coverage B10gcovr_run B09googletests B09copy_results
758+ hooks: H05set_package_version D00mbs_archive D10install_google_test H10enable_coverage B10gcovr_run B09googletests B09copy_results
759 archive_artifacts: '**/results/**'
760 publish_coverage: '**/results/coverage.xml'
761 publish_junit: '**/results/*test*xml'
762 configurations:
763 raring-armhf:
764- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10install_google_test B09googletests B09copy_results
765+ hooks: H05set_package_version D00mbs_archive D10install_google_test B09googletests B09copy_results
766 unity-asset-pool:
767 unity-lens-applications:
768- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
769+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
770 configurations:
771 raring-armhf:
772- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
773+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
774 archive_artifacts: False
775 archive_artifacts: '**/results/**'
776 publish_coverage: '**/results/coverage.xml'
777 unity-lens-files:
778 unity-lens-friends:
779 unity-lens-music:
780- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
781+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
782 configurations:
783 raring-armhf:
784- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
785+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
786 archive_artifacts: False
787 archive_artifacts: '**/results/**'
788 publish_coverage: '**/results/coverage.xml'
789 unity-lens-photos:
790 unity-lens-shopping:
791- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
792+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
793 configurations:
794 raring-armhf:
795- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
796+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
797 archive_artifacts: False
798 archive_artifacts: '**/results/**'
799 publish_coverage: '**/results/coverage.xml'
800 unity-lens-video:
801- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
802+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
803 configurations:
804 raring-armhf:
805- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
806+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
807 archive_artifacts: False
808 archive_artifacts: '**/results/**'
809 publish_coverage: '**/results/coverage.xml'
810
811=== modified file 'stacks/raring/oif.cfg'
812--- stacks/raring/oif.cfg 2013-04-30 18:25:22 +0000
813+++ stacks/raring/oif.cfg 2013-05-29 14:11:26 +0000
814@@ -10,8 +10,9 @@
815 contact_email: "francis.ginther@canonical.com"
816 team: PS-QA
817 autolanding_template: mbs-autolanding-config.xml.tmpl
818- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check
819- hook_source: lp:~private-ps-quality-team/+junk/oif-hooks
820+ rebuild_template: mbs-rebuild-config.xml.tmpl
821+ hooks: H05set_package_version D00mbs_archive
822+ hook_source: lp:~private-ps-quality-team/+junk/mbs-archive-hooks
823 configurations:
824 raring-amd64:
825 template: mbs-pbuilder-config.xml.tmpl
826@@ -25,9 +26,9 @@
827 publish_coverage: False
828 local_archive_host: naartjie
829 local_archive_login: ubuntu
830- local_archive_tmp: /home/ubuntu/ppa_archive/oif-staging
831- local_archive: oif-staging
832- local_archive_source: http://naartjie/archive/oif-staging
833+ local_archive_tmp: /home/ubuntu/local-archive
834+ local_archive_name: raring.oif
835+ local_archive_source: http://naartjie/archive/
836 local_archive_pocket: raring
837 dependencies:
838 - qa
839@@ -39,6 +40,7 @@
840 evemu:
841 target_branch: lp:evemu/raring
842 autolanding_template: autolanding-config.xml.tmpl
843+ rebuild_template: False
844 configurations:
845 raring-amd64:
846 template: pbuilder-config.xml.tmpl
847@@ -48,9 +50,12 @@
848 template: pbuilder-config.xml.tmpl
849 frame:
850 target_branch: lp:frame/raring
851+ rebuild: grail
852 geis:
853 target_branch: lp:geis/raring
854+ rebuild: libgrip
855 grail:
856 target_branch: lp:grail/raring
857+ rebuild: geis
858 libgrip:
859 target_branch: lp:libgrip/raring
860
861=== modified file 'stacks/raring/unity.cfg'
862--- stacks/raring/unity.cfg 2013-05-28 17:20:56 +0000
863+++ stacks/raring/unity.cfg 2013-05-29 14:11:26 +0000
864@@ -10,8 +10,9 @@
865 contact_email: "francis.ginther@canonical.com"
866 team: PS-QA
867 autolanding_template: mbs-autolanding-config.xml.tmpl
868- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check
869- hook_source: lp:~private-ps-quality-team/+junk/mbs-hooks
870+ rebuild_template: mbs-rebuild-config.xml.tmpl
871+ hooks: H05set_package_version D00mbs_archive
872+ hook_source: lp:~private-ps-quality-team/+junk/unity-hooks
873 configurations:
874 raring-amd64:
875 template: mbs-pbuilder-config.xml.tmpl
876@@ -23,11 +24,11 @@
877 template: mbs-pbuilder-config.xml.tmpl
878 node_label: panda-pbuilder
879 publish_coverage: False
880- local_archive: staging
881+ local_archive_name: raring.unity
882 local_archive_host: naartjie
883 local_archive_login: ubuntu
884- local_archive_tmp: /home/ubuntu/ppa_archive/staging
885- local_archive_source: http://naartjie/archive/staging
886+ local_archive_tmp: /home/ubuntu/local-archive
887+ local_archive_source: http://naartjie/archive/
888 local_archive_pocket: raring
889 test_parameters:
890 testpackages: unity-autopilot
891@@ -42,62 +43,64 @@
892 compiz:
893 build_timeout: 240
894 target_branch: lp:compiz/0.9.9
895- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests_cmake H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov
896+ hooks: H05set_package_version D00mbs_archive B09googletests_cmake H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov
897 archive_artifacts: '**/results/**'
898 publish_coverage: '**/results/coverage.xml'
899 publish_junit: '**/results/*test*xml'
900+ rebuild: unity
901 autolanding:
902- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests_cmake H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov
903+ hooks: H05set_package_version D00mbs_archive B09googletests_cmake H15enable_testing D10install_google_test H10enable_coverage B10gcovr_run D10install_lcov
904 configurations:
905 raring-armhf:
906- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests_cmake H15enable_testing D10install_google_test
907+ hooks: H05set_package_version D00mbs_archive B09googletests_cmake H15enable_testing D10install_google_test
908 ci:
909 hooks: H10enable_coverage B02google-tests
910 configurations:
911 compiz-gles-ci:
912 template: False
913 raring-armhf:
914- hooks: D00mbs_archive H40enable_gensymbols_check B09googletests H15enable_testing D10install_google_test D10install_valgrind
915+ hooks: D00mbs_archive B09googletests H15enable_testing D10install_google_test D10install_valgrind
916 dee:
917 target_branch: lp:~unity-team/dee/raring
918- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B05xsltproc B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
919+ hooks: H05set_package_version D00mbs_archive D10specifictests B05xsltproc B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
920 archive_artifacts: '**/results/**'
921 publish_coverage: '**/results/coverage.xml'
922 publish_junit: '**/results/*test*xml'
923 configurations:
924 raring-armhf:
925- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B05xsltproc B09copy_results
926+ hooks: H05set_package_version D00mbs_archive D10specifictests B05xsltproc B09copy_results
927 libunity:
928 target_branch: lp:libunity/raring
929 libunity-misc:
930 target_branch: lp:libunity-misc/raring
931 nux:
932 target_branch: lp:nux/raring
933- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests B09copy_results D10specifictests H10enable_coverage B10gcovr_run D10install_lcov
934+ hooks: H05set_package_version D00mbs_archive B09googletests B09copy_results D10specifictests H10enable_coverage B10gcovr_run D10install_lcov
935 archive_artifacts: '**/results/**'
936 publish_coverage: '**/results/coverage.xml'
937 publish_junit: '**/results/*test*xml'
938+ rebuild: unity
939 configurations:
940 raring-armhf:
941- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check B09googletests B09copy_results D10specifictests
942+ hooks: H05set_package_version D00mbs_archive B09googletests B09copy_results D10specifictests
943 unity:
944 target_branch: lp:unity/7.0
945 build_timeout: 240
946- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10install_google_test H10enable_coverage B10gcovr_run B09googletests B09copy_results
947+ hooks: H05set_package_version D00mbs_archive D10install_google_test H10enable_coverage B10gcovr_run B09googletests B09copy_results
948 archive_artifacts: '**/results/**'
949 publish_coverage: '**/results/coverage.xml'
950 publish_junit: '**/results/*test*xml'
951 configurations:
952 raring-armhf:
953- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10install_google_test B09googletests B09copy_results
954+ hooks: H05set_package_version D00mbs_archive D10install_google_test B09googletests B09copy_results
955 unity-asset-pool:
956 target_branch: lp:unity-asset-pool/raring
957 unity-lens-applications:
958 target_branch: lp:unity-lens-applications/raring
959- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
960+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
961 configurations:
962 raring-armhf:
963- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
964+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
965 archive_artifacts: False
966 archive_artifacts: '**/results/**'
967 publish_coverage: '**/results/coverage.xml'
968@@ -105,10 +108,10 @@
969 target_branch: lp:unity-lens-files/raring
970 unity-lens-music:
971 target_branch: lp:unity-lens-music/raring
972- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
973+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
974 configurations:
975 raring-armhf:
976- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
977+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
978 archive_artifacts: False
979 archive_artifacts: '**/results/**'
980 publish_coverage: '**/results/coverage.xml'
981@@ -116,10 +119,10 @@
982 target_branch: lp:unity-lens-photos/raring
983 unity-lens-shopping:
984 target_branch: lp:unity-lens-shopping/raring
985- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
986+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
987 configurations:
988 raring-armhf:
989- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
990+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
991 archive_artifacts: False
992 archive_artifacts: '**/results/**'
993 publish_coverage: '**/results/coverage.xml'
994@@ -127,10 +130,10 @@
995 target_branch: lp:unity-scope-gdrive/raring
996 unity-lens-video:
997 target_branch: lp:unity-lens-video/raring
998- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
999+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results H10enable_coverage B10gcovr_run D10install_lcov
1000 configurations:
1001 raring-armhf:
1002- hooks: H05set_package_version D00mbs_archive H40enable_gensymbols_check D10specifictests B09copy_results
1003+ hooks: H05set_package_version D00mbs_archive D10specifictests B09copy_results
1004 archive_artifacts: False
1005 archive_artifacts: '**/results/**'
1006 publish_coverage: '**/results/coverage.xml'
1007
1008=== modified file 'tests/test_cu2dUpdateCi.py'
1009--- tests/test_cu2dUpdateCi.py 2013-05-22 13:12:26 +0000
1010+++ tests/test_cu2dUpdateCi.py 2013-05-29 14:11:26 +0000
1011@@ -272,7 +272,7 @@
1012 self.assertEqual(expected, actual)
1013
1014
1015-class TestGenerateJobs(TestWithScenarios, TestCase):
1016+class TestGenerateJobs(TestCase):
1017 job_template = 'ci.xml.tmpl'
1018 build_template = 'build.xml.tmpl'
1019
1020@@ -288,7 +288,7 @@
1021 'foo-raring-i386-ci',
1022 'foo-ci']
1023 job_list = []
1024- self.update_ci.generate_jobs(job_list, 'foo', 'ci', config,
1025+ self.update_ci.generate_jobs(job_list, 'foo', 'ci', 'ci', config,
1026 self.job_template, self.build_template,
1027 {})
1028 actual = [job['name'] for job in job_list]
1029@@ -303,7 +303,7 @@
1030 'build.xml.tmpl',
1031 'ci.xml.tmpl']
1032 job_list = []
1033- self.update_ci.generate_jobs(job_list, 'foo', 'ci', config,
1034+ self.update_ci.generate_jobs(job_list, 'foo', 'ci', 'ci', config,
1035 self.job_template, self.build_template,
1036 {})
1037 actual = [job['template'] for job in job_list]
1038@@ -320,7 +320,7 @@
1039 'bar.xml.tmpl',
1040 'ci.xml.tmpl']
1041 job_list = []
1042- self.update_ci.generate_jobs(job_list, 'foo', 'ci', config,
1043+ self.update_ci.generate_jobs(job_list, 'foo', 'ci', 'ci', config,
1044 self.job_template, self.build_template,
1045 {})
1046 actual = [job['template'] for job in job_list]
1047@@ -333,12 +333,39 @@
1048 'raring-i386': {'node_label': 'pbuilder'}}}
1049 expected = 'foo-raring-amd64-ci,foo-raring-i386-ci'
1050 job_list = []
1051- self.update_ci.generate_jobs(job_list, 'foo', 'ci', config,
1052+ self.update_ci.generate_jobs(job_list, 'foo', 'ci', 'ci', config,
1053 self.job_template, self.build_template,
1054 {})
1055 actual = job_list[2]['ctx']['builder_list']
1056 self.assertEqual(expected, actual)
1057
1058+ def test_generate_rebuild_builder_list(self):
1059+ config = {
1060+ 'configurations': {
1061+ 'raring-amd64': {'node_label': 'pbuilder'},
1062+ 'raring-i386': {'node_label': 'pbuilder'}}}
1063+ expected = 'foo-raring-amd64-autolanding,foo-raring-i386-autolanding'
1064+ job_list = []
1065+ self.update_ci.generate_jobs(job_list, 'foo', 'rebuild', 'autolanding',
1066+ config, self.job_template,
1067+ self.build_template, {})
1068+ actual = job_list[0]['ctx']['builder_list']
1069+ self.assertEqual(expected, actual)
1070+
1071+ def test_generate_rebuild_joblist(self):
1072+ config = {
1073+ 'configurations': {
1074+ 'raring-amd64': {'node_label': 'pbuilder'},
1075+ 'raring-i386': {'node_label': 'pbuilder'}}}
1076+ expected = 'foo-rebuild'
1077+ job_list = []
1078+ self.update_ci.generate_jobs(job_list, 'foo', 'rebuild', 'autolanding',
1079+ config, self.job_template,
1080+ self.build_template, {})
1081+ actual = job_list[0]['name']
1082+ self.assertEqual(expected, actual)
1083+ self.assertEqual(1, len(job_list))
1084+
1085
1086 class TestUpdateJenkins(TestCase):
1087 def setUp(self):
1088@@ -415,11 +442,13 @@
1089 'landing_job': 'generic-land'},
1090 'projects': {
1091 'autopilot': {
1092+ 'rebuild_template': 'rebuild-config.xml.tmpl',
1093 'team': 'Autopilot Team',
1094 'contact_email': 'address@email',
1095 'distributions': 'raring,quantal,precise',
1096 'ppa_target': 'ppa:autopilot/ppa',
1097 'hooks': 'parent-hook',
1098+ 'rebuild': 'autopilot-qt , autopilot-gtk',
1099 'autolanding': {
1100 'postbuild_job': 'autopilot-docs-upload',
1101 'archive_artifacts': '**/output/*deb',
1102@@ -430,7 +459,13 @@
1103 'raring-i386': {
1104 'template': 'autopilot-config.xml.tmpl',
1105 'node_label': 'pbuilder'}}}},
1106- 'xpathselect': {}}}}
1107+ 'autopilot-gtk': {
1108+ 'rebuild_template': 'rebuild-config.xml.tmpl',
1109+ 'target_branch': 'lp:autopilot-gtk/1.0'},
1110+ 'autopilot-qt': {
1111+ 'rebuild_template': 'rebuild-config.xml.tmpl'},
1112+ 'xpathselect': {
1113+ 'rebuild': 'autopilot,another-project-rebuild'}}}}
1114
1115 def setUp(self):
1116 self.update_ci = UpdateCi()
1117@@ -447,12 +482,27 @@
1118 'autopilot-raring-armhf-autolanding',
1119 'autopilot-raring-i386-autolanding',
1120 'autopilot-autolanding',
1121+ 'autopilot-rebuild',
1122+ 'autopilot-qt-raring-amd64-ci',
1123+ 'autopilot-qt-raring-armhf-ci',
1124+ 'autopilot-qt-ci',
1125+ 'autopilot-qt-raring-amd64-autolanding',
1126+ 'autopilot-qt-raring-armhf-autolanding',
1127+ 'autopilot-qt-autolanding',
1128+ 'autopilot-qt-rebuild',
1129 'xpathselect-raring-amd64-ci',
1130 'xpathselect-raring-armhf-ci',
1131 'xpathselect-ci',
1132 'xpathselect-raring-amd64-autolanding',
1133 'xpathselect-raring-armhf-autolanding',
1134- 'xpathselect-autolanding']
1135+ 'xpathselect-autolanding',
1136+ 'autopilot-gtk-1.0-raring-amd64-ci',
1137+ 'autopilot-gtk-1.0-raring-armhf-ci',
1138+ 'autopilot-gtk-1.0-ci',
1139+ 'autopilot-gtk-1.0-raring-amd64-autolanding',
1140+ 'autopilot-gtk-1.0-raring-armhf-autolanding',
1141+ 'autopilot-gtk-1.0-autolanding',
1142+ 'autopilot-gtk-1.0-rebuild']
1143 actual_name_list = [job['name'] for job in self.job_list]
1144 self.assertEqual(expected_name_list, actual_name_list)
1145
1146@@ -464,12 +514,27 @@
1147 'pbuilder-config.xml.tmpl',
1148 'autopilot-config.xml.tmpl',
1149 'autolanding-config.xml.tmpl',
1150- 'pbuilder-config.xml.tmpl',
1151- 'pbuilder-config.xml.tmpl',
1152- 'ci-config.xml.tmpl',
1153- 'pbuilder-config.xml.tmpl',
1154- 'pbuilder-config.xml.tmpl',
1155- 'autolanding-config.xml.tmpl']
1156+ 'rebuild-config.xml.tmpl',
1157+ 'pbuilder-config.xml.tmpl',
1158+ 'pbuilder-config.xml.tmpl',
1159+ 'ci-config.xml.tmpl',
1160+ 'pbuilder-config.xml.tmpl',
1161+ 'pbuilder-config.xml.tmpl',
1162+ 'autolanding-config.xml.tmpl',
1163+ 'rebuild-config.xml.tmpl',
1164+ 'pbuilder-config.xml.tmpl',
1165+ 'pbuilder-config.xml.tmpl',
1166+ 'ci-config.xml.tmpl',
1167+ 'pbuilder-config.xml.tmpl',
1168+ 'pbuilder-config.xml.tmpl',
1169+ 'autolanding-config.xml.tmpl',
1170+ 'pbuilder-config.xml.tmpl',
1171+ 'pbuilder-config.xml.tmpl',
1172+ 'ci-config.xml.tmpl',
1173+ 'pbuilder-config.xml.tmpl',
1174+ 'pbuilder-config.xml.tmpl',
1175+ 'autolanding-config.xml.tmpl',
1176+ 'rebuild-config.xml.tmpl']
1177 actual_template_list = [job['template'] for job in self.job_list]
1178 self.assertEqual(expected_template_list, actual_template_list)
1179
1180@@ -498,6 +563,8 @@
1181 self.assertEqual(job['ctx']['priority'], 10000)
1182 elif job['name'].endswith('autolanding'):
1183 self.assertEqual(job['ctx']['priority'], 1000)
1184+ elif job['name'].endswith('rebuild'):
1185+ self.assertEqual(job['ctx']['priority'], 1000)
1186 else:
1187 self.assertEqual(job['ctx']['priority'], 100)
1188
1189@@ -554,6 +621,21 @@
1190 # Make sure no assertion groups were missed
1191 self.assertEqual(count, 3)
1192
1193+ def test_rebuild_list(self):
1194+ count = 0
1195+ for job in self.job_list:
1196+ if job['name'] == 'xpathselect-autolanding':
1197+ self.assertEqual(job['ctx']['rebuild'],
1198+ 'autopilot-rebuild,another-project-rebuild')
1199+ count += 1
1200+ if job['name'] == 'autopilot-autolanding':
1201+ self.assertEqual(job['ctx']['rebuild'],
1202+ 'autopilot-qt-rebuild,'
1203+ 'autopilot-gtk-1.0-rebuild')
1204+ count += 1
1205+ # Make sure no assertion groups were missed
1206+ self.assertEqual(count, 2)
1207+
1208 def test_target_project(self):
1209 job_list = []
1210 target_project = 'autopilot'
1211@@ -565,7 +647,8 @@
1212 'autopilot-raring-amd64-autolanding',
1213 'autopilot-raring-armhf-autolanding',
1214 'autopilot-raring-i386-autolanding',
1215- 'autopilot-autolanding']
1216+ 'autopilot-autolanding',
1217+ 'autopilot-rebuild']
1218 actual_name_list = [job['name'] for job in job_list]
1219 self.assertEqual(expected_name_list, actual_name_list)
1220

Subscribers

People subscribed via source and target branches

to all changes: