Merge lp:~cjwatson/launchpad-buildd/snap-lxd into lp:launchpad-buildd

Proposed by Colin Watson
Status: Merged
Merged at revision: 267
Proposed branch: lp:~cjwatson/launchpad-buildd/snap-lxd
Merge into: lp:launchpad-buildd
Diff against target: 89 lines (+9/-9)
4 files modified
debian/changelog (+1/-0)
lpbuildd/snap.py (+1/-0)
lpbuildd/target/build_snap.py (+2/-0)
lpbuildd/tests/test_snap.py (+5/-9)
To merge this branch: bzr merge lp:~cjwatson/launchpad-buildd/snap-lxd
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+329615@code.launchpad.net

Commit message

Switch snap builds to the LXD backend.

To post a comment you must log in.
267. By Colin Watson

Merge trunk.

Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-08-23 00:22:11 +0000
3+++ debian/changelog 2017-08-26 09:47:32 +0000
4@@ -25,6 +25,7 @@
5 * Convert buildlivefs to the new Operation framework and add unit tests.
6 * Convert buildsnap to the new Operation framework and add unit tests.
7 * Add a LXD backend.
8+ * Switch snap builds to the LXD backend.
9
10 -- Colin Watson <cjwatson@ubuntu.com> Tue, 25 Jul 2017 23:07:58 +0100
11
12
13=== modified file 'lpbuildd/snap.py'
14--- lpbuildd/snap.py 2017-08-23 00:13:20 +0000
15+++ lpbuildd/snap.py 2017-08-26 09:47:32 +0000
16@@ -28,6 +28,7 @@
17 class SnapBuildManager(DebianBuildManager):
18 """Build a snap."""
19
20+ backend_name = "lxd"
21 initial_build_state = SnapBuildState.BUILD_SNAP
22
23 @property
24
25=== modified file 'lpbuildd/target/build_snap.py'
26--- lpbuildd/target/build_snap.py 2017-08-23 00:13:20 +0000
27+++ lpbuildd/target/build_snap.py 2017-08-26 09:47:32 +0000
28@@ -99,6 +99,8 @@
29 def install(self):
30 logger.info("Running install phase...")
31 deps = ["snapcraft"]
32+ if self.args.backend == "lxd":
33+ deps.extend(["snapd", "fuse", "squashfuse"])
34 if self.args.branch is not None:
35 deps.append("bzr")
36 else:
37
38=== modified file 'lpbuildd/tests/test_snap.py'
39--- lpbuildd/tests/test_snap.py 2017-08-23 00:13:20 +0000
40+++ lpbuildd/tests/test_snap.py 2017-08-26 09:47:32 +0000
41@@ -77,7 +77,7 @@
42 expected_command = [
43 "sharepath/slavebin/in-target", "in-target",
44 "buildsnap",
45- "--backend=chroot", "--series=xenial", "--arch=i386", self.buildid,
46+ "--backend=lxd", "--series=xenial", "--arch=i386", self.buildid,
47 "--git-repository", "https://git.launchpad.dev/~example/+git/snap",
48 "--git-path", "master",
49 "test-snap",
50@@ -113,8 +113,7 @@
51 expected_command = [
52 "sharepath/slavebin/in-target", "in-target",
53 "scan-for-processes",
54- "--backend=chroot", "--series=xenial", "--arch=i386",
55- self.buildid,
56+ "--backend=lxd", "--series=xenial", "--arch=i386", self.buildid,
57 ]
58 self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState())
59 self.assertEqual(expected_command, self.buildmanager.commands[-1])
60@@ -130,8 +129,7 @@
61 expected_command = [
62 "sharepath/slavebin/in-target", "in-target",
63 "umount-chroot",
64- "--backend=chroot", "--series=xenial", "--arch=i386",
65- self.buildid,
66+ "--backend=lxd", "--series=xenial", "--arch=i386", self.buildid,
67 ]
68 self.assertEqual(SnapBuildState.UMOUNT, self.getState())
69 self.assertEqual(expected_command, self.buildmanager.commands[-1])
70@@ -158,8 +156,7 @@
71 expected_command = [
72 "sharepath/slavebin/in-target", "in-target",
73 "scan-for-processes",
74- "--backend=chroot", "--series=xenial", "--arch=i386",
75- self.buildid,
76+ "--backend=lxd", "--series=xenial", "--arch=i386", self.buildid,
77 ]
78 self.assertEqual(SnapBuildState.BUILD_SNAP, self.getState())
79 self.assertEqual(expected_command, self.buildmanager.commands[-1])
80@@ -176,8 +173,7 @@
81 expected_command = [
82 "sharepath/slavebin/in-target", "in-target",
83 "umount-chroot",
84- "--backend=chroot", "--series=xenial", "--arch=i386",
85- self.buildid,
86+ "--backend=lxd", "--series=xenial", "--arch=i386", self.buildid,
87 ]
88 self.assertEqual(SnapBuildState.UMOUNT, self.getState())
89 self.assertEqual(expected_command, self.buildmanager.commands[-1])

Subscribers

People subscribed via source and target branches

to all changes: