Merge lp:~cjwatson/launchpad/snap-build-pass-series into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18440
Proposed branch: lp:~cjwatson/launchpad/snap-build-pass-series
Merge into: lp:launchpad
Diff against target: 54 lines (+6/-0)
2 files modified
lib/lp/snappy/model/snapbuildbehaviour.py (+1/-0)
lib/lp/snappy/tests/test_snapbuildbehaviour.py (+5/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpad/snap-build-pass-series
Reviewer Review Type Date Requested Status
William Grant Approve
Review via email: mp+328050@code.launchpad.net

Commit message

Pass series name to snap builds, to make future LXD image creation easier.

Description of the change

I don't think it's absolutely required to put the series in the properties of a LXD image, but it seems like a good idea for debugging, and Stéphane's example chroot-to-LXD-image conversion script uses it.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/snappy/model/snapbuildbehaviour.py'
2--- lib/lp/snappy/model/snapbuildbehaviour.py 2017-07-24 15:19:50 +0000
3+++ lib/lp/snappy/model/snapbuildbehaviour.py 2017-07-25 21:49:52 +0000
4@@ -96,6 +96,7 @@
5 endpoint=config.snappy.builder_proxy_auth_api_endpoint,
6 token=token['username']))
7 args["name"] = build.snap.name
8+ args["series"] = build.distro_series.name
9 args["arch_tag"] = build.distro_arch_series.architecturetag
10 # XXX cjwatson 2015-08-03: Allow tools_source to be overridden at
11 # some more fine-grained level.
12
13=== modified file 'lib/lp/snappy/tests/test_snapbuildbehaviour.py'
14--- lib/lp/snappy/tests/test_snapbuildbehaviour.py 2017-07-24 15:19:50 +0000
15+++ lib/lp/snappy/tests/test_snapbuildbehaviour.py 2017-07-25 21:49:52 +0000
16@@ -277,6 +277,7 @@
17 "name": u"test-snap",
18 "proxy_url": self.proxy_url,
19 "revocation_endpoint": self.revocation_endpoint,
20+ "series": "unstable",
21 "trusted_keys": expected_trusted_keys,
22 }, args)
23
24@@ -299,6 +300,7 @@
25 "name": u"test-snap",
26 "proxy_url": self.proxy_url,
27 "revocation_endpoint": self.revocation_endpoint,
28+ "series": "unstable",
29 "trusted_keys": expected_trusted_keys,
30 }, args)
31
32@@ -321,6 +323,7 @@
33 "name": u"test-snap",
34 "proxy_url": self.proxy_url,
35 "revocation_endpoint": self.revocation_endpoint,
36+ "series": "unstable",
37 "trusted_keys": expected_trusted_keys,
38 }, args)
39
40@@ -345,6 +348,7 @@
41 "name": u"test-snap",
42 "proxy_url": self.proxy_url,
43 "revocation_endpoint": self.revocation_endpoint,
44+ "series": "unstable",
45 "trusted_keys": expected_trusted_keys,
46 }, args)
47
48@@ -367,6 +371,7 @@
49 "name": u"test-snap",
50 "proxy_url": self.proxy_url,
51 "revocation_endpoint": self.revocation_endpoint,
52+ "series": "unstable",
53 "trusted_keys": expected_trusted_keys,
54 }, args)
55