Merge lp:~jibel/cupstream2distro-config/skip_downstream_task_if_no_project into lp:cupstream2distro-config

Proposed by Jean-Baptiste Lallement
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 123
Merged at revision: 124
Proposed branch: lp:~jibel/cupstream2distro-config/skip_downstream_task_if_no_project
Merge into: lp:cupstream2distro-config
Diff against target: 32 lines (+3/-1)
2 files modified
daily-release/cu2d-update-stack (+1/-1)
daily-release/jenkins-templates/prepare-config.xml.tmpl (+2/-0)
To merge this branch: bzr merge lp:~jibel/cupstream2distro-config/skip_downstream_task_if_no_project
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Didier Roche-Tolomelli Pending
Review via email: mp+155975@code.launchpad.net

Commit message

Skip section 'TriggerBuilder' in template 'prepare-config' if the project list is empty

Description of the change

When the project list for a stack is empty the template generated contained a section to build downstream projects with an empty field "Projects to build" which make the job fail.

This patch completely skips this section if the project list is empty

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'daily-release/cu2d-update-stack'
2--- daily-release/cu2d-update-stack 2013-03-13 18:25:09 +0000
3+++ daily-release/cu2d-update-stack 2013-03-28 14:33:27 +0000
4@@ -139,7 +139,7 @@
5 ctx['opts'] = '-s %s -p %s -b %s -n %s' % (
6 stack['series'], stack['ppa'], lpb, srcname)
7 if stack['dest'] != 'ubuntu':
8- ctx['opts'] += ' -d {}'.format(stack['dest'])
9+ ctx['opts'] += ' -d {}'.format(stack['dest'])
10 ctx['projectname'] = srcname
11 setup_job(jkh, jjenv, jobname, TEMPLATES['prepare-project'],
12 ctx, update)
13
14=== modified file 'daily-release/jenkins-templates/prepare-config.xml.tmpl'
15--- daily-release/jenkins-templates/prepare-config.xml.tmpl 2013-03-11 10:56:24 +0000
16+++ daily-release/jenkins-templates/prepare-config.xml.tmpl 2013-03-28 14:33:27 +0000
17@@ -22,6 +22,7 @@
18
19 </command>
20 </hudson.tasks.Shell>
21+{% if projects %}
22 <hudson.plugins.parameterizedtrigger.TriggerBuilder>
23 <configs>
24 <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
25@@ -52,6 +53,7 @@
26 </hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
27 </configs>
28 </hudson.plugins.parameterizedtrigger.TriggerBuilder>
29+{% endif %}
30 </builders>
31 <publishers>
32 <hudson.plugins.build__publisher.BuildPublisher>

Subscribers

People subscribed via source and target branches

to all changes: