Merge ~saviq/jenkaas-jobs:add-autolanding into ~michihenning/jenkaas-jobs:master

Proposed by Michał Sawicz
Status: Merged
Approved by: Michi Henning
Approved revision: df6b4f74cccb019c68d4de2ac471b00c321706ae
Merged at revision: df6b4f74cccb019c68d4de2ac471b00c321706ae
Proposed branch: ~saviq/jenkaas-jobs:add-autolanding
Merge into: ~michihenning/jenkaas-jobs:master
Diff against target: 182 lines (+33/-32)
6 files modified
jenkaas_jobs/yaml/launchpad/launchpad.yaml (+1/-1)
project-example.yaml (+19/-16)
tests/fixtures/launchpad/lp-three-autoland.xml (+1/-1)
tests/fixtures/launchpad/lp-two-autoland.xml (+4/-4)
tests/fixtures/launchpad/lp-two-trigger-autolanding.xml (+2/-2)
tests/project.yaml (+6/-8)
Reviewer Review Type Date Requested Status
Michi Henning Pending
Review via email: mp+293860@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jenkaas_jobs/yaml/launchpad/launchpad.yaml b/jenkaas_jobs/yaml/launchpad/launchpad.yaml
2index 6b38245..3cd22dc 100644
3--- a/jenkaas_jobs/yaml/launchpad/launchpad.yaml
4+++ b/jenkaas_jobs/yaml/launchpad/launchpad.yaml
5@@ -13,7 +13,7 @@
6
7 - job-group:
8 name: lp-{project}-autolanding
9- branch: {project}
10+ branch: lp:{project}
11 jobs:
12 - lp-{project}-trigger-autolanding
13 - lp-{project}-autoland
14diff --git a/project-example.yaml b/project-example.yaml
15index 587558d..dbd7205 100644
16--- a/project-example.yaml
17+++ b/project-example.yaml
18@@ -91,7 +91,7 @@
19 # of them by putting the same key under the entry in the "jobs" key.
20
21 # Default space-separated list of autopkgtest names.
22- autopkgtest_names: ''
23+ autopkgtest_names: &autopkgtest_names ''
24
25 # Which autopktests to run on which architectures.
26 #
27@@ -99,7 +99,7 @@
28 #
29 # FIXME: this has to use XML entities for & due to a Jenkins Job Builder
30 # limitation.
31- autopkgtest_filter:
32+ autopkgtest_filter: &autopkgtest_filter
33 (label=="amd64" && testname=="test-name.sh") || (label=="phone-armhf" && testname=="autopilot.sh" && release=="vivid+overlay")
34
35 # A list of Launchpad projects to configure for CI, each of which can have
36@@ -107,8 +107,8 @@
37 project:
38 - your-project:
39 autopkgtest_names: test-name.sh autopilot.sh
40- - your-other-project
41- - even-another-project:
42+ - your-other-project: &your_other_project
43+ - even-another-project: &even_another_project
44 # You can direct the trigger and CI jobs at a branch different than
45 # lp:{project}
46 branch: lp:another-branch
47@@ -153,15 +153,18 @@
48
49 # If only some projects defined above use autolanding, you can selectively enable them by adding
50 # the project below. This example enables autolanding for your-other-project and even-another-project.
51-# Note that the branch for even-another-project *must* match the branch specified above, otherwise
52-# the MR will land in the wrong branch!
53-#
54-# - project:
55-# name: your-project-autolanding
56-# autopkgtest_filter: *autopkgtest_filter
57-# project:
58-# - your-other-project
59-# - even-another-project:
60-# branch: lp:{project}/devel
61-# jobs:
62-# - lp-{project}-autolanding
63+# The per-project variables need to be set here - use references, unless you want the configurations
64+# to differ. You might for example want a wider set of tests to run during autolanding. In that case
65+# you can still use references and only override a single parameter.
66+
67+- project:
68+ name: your-project-autolanding
69+ autopkgtest_names: *autopkgtest_names
70+ autopkgtest_filter: *autopkgtest_filter
71+ project:
72+ - your-other-project: *your_other_project
73+ - even-another-project:
74+ <<: *even_another_project
75+ autopkgtest_names: test-name.sh autopilot.sh integration.sh
76+ jobs:
77+ - lp-{project}-autolanding
78\ No newline at end of file
79diff --git a/tests/fixtures/launchpad/lp-three-autoland.xml b/tests/fixtures/launchpad/lp-three-autoland.xml
80index 0eec3e2..7660caa 100644
81--- a/tests/fixtures/launchpad/lp-three-autoland.xml
82+++ b/tests/fixtures/launchpad/lp-three-autoland.xml
83@@ -86,7 +86,7 @@ target_branch=lp:three/devel
84 <configs>
85 <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
86 <properties>build_run=build#${TRIGGERED_BUILD_NUMBER_build}
87-testnames=
88+testnames=test-three
89 </properties>
90 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
91 <hudson.plugins.parameterizedtrigger.matrix.MatrixSubsetBuildParameters>
92diff --git a/tests/fixtures/launchpad/lp-two-autoland.xml b/tests/fixtures/launchpad/lp-two-autoland.xml
93index 1e537ae..8613b23 100644
94--- a/tests/fixtures/launchpad/lp-two-autoland.xml
95+++ b/tests/fixtures/launchpad/lp-two-autoland.xml
96@@ -1,7 +1,7 @@
97 <?xml version="1.0" encoding="utf-8"?>
98 <project>
99 <actions/>
100- <description>Auto-land top-approved merge proposal in lp:two/devel&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
101+ <description>Auto-land top-approved merge proposal in lp:two&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
102 <keepDependencies>false</keepDependencies>
103 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
104 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
105@@ -49,7 +49,7 @@
106 <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
107 <properties>source_branch=${landing_candidate}
108 source_revision=${candidate_revision}
109-target_branch=lp:two/devel
110+target_branch=lp:two
111 </properties>
112 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
113 </configs>
114@@ -86,11 +86,11 @@ target_branch=lp:two/devel
115 <configs>
116 <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
117 <properties>build_run=build#${TRIGGERED_BUILD_NUMBER_build}
118-testnames=
119+testnames=test-one test-two
120 </properties>
121 </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
122 <hudson.plugins.parameterizedtrigger.matrix.MatrixSubsetBuildParameters>
123- <filter>two_autopkgtest_filter</filter>
124+ <filter>(label=="armhf").implies(testname=="test-one")</filter>
125 </hudson.plugins.parameterizedtrigger.matrix.MatrixSubsetBuildParameters>
126 </configs>
127 <projects>test-0-autopkgtest</projects>
128diff --git a/tests/fixtures/launchpad/lp-two-trigger-autolanding.xml b/tests/fixtures/launchpad/lp-two-trigger-autolanding.xml
129index 5d9f5d7..6af75ad 100644
130--- a/tests/fixtures/launchpad/lp-two-trigger-autolanding.xml
131+++ b/tests/fixtures/launchpad/lp-two-trigger-autolanding.xml
132@@ -1,7 +1,7 @@
133 <?xml version="1.0" encoding="utf-8"?>
134 <project>
135 <actions/>
136- <description>Auto-land top-approved changes for lp:two/devel&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
137+ <description>Auto-land top-approved changes for lp:two&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
138 <keepDependencies>false</keepDependencies>
139 <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
140 <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
141@@ -33,7 +33,7 @@
142 # log all commands and abort on error
143 set -ex
144
145-launchpadTrigger --lock-name=${JOB_NAME} --job=lp-two-autoland --branch=lp:two/devel --autoland || true
146+launchpadTrigger --lock-name=${JOB_NAME} --job=lp-two-autoland --branch=lp:two --autoland || true
147 </command>
148 </hudson.tasks.Shell>
149 </builders>
150diff --git a/tests/project.yaml b/tests/project.yaml
151index e4abf1f..f28afc5 100644
152--- a/tests/project.yaml
153+++ b/tests/project.yaml
154@@ -22,11 +22,10 @@
155 ''
156 project:
157 - one
158- - two:
159+ - two: &two
160 autopkgtest_names: test-one test-two
161- autopkgtest_filter: &two_autopkg_test_filter
162- (label==&quot;armhf&quot;).implies(testname==&quot;test-one&quot;)
163- - three:
164+ autopkgtest_filter: (label==&quot;armhf&quot;).implies(testname==&quot;test-one&quot;)
165+ - three: &three
166 branch: lp:three/devel
167 jobs:
168 - prepare-jobs
169@@ -42,10 +41,9 @@
170 name: test-autolanding
171 autopkgtest_filter: *autopkgtest_filter
172 project:
173- - two:
174- autopkgtest_filter: two_autopkgtest_filter
175- branch: lp:two/devel
176+ - two: *two
177 - three:
178- branch: lp:three/devel
179+ <<: *three
180+ autopkgtest_names: test-three
181 jobs:
182 - lp-{project}-autolanding

Subscribers

People subscribed via source and target branches

to all changes: