Merge lp:~vorlon/ubuntu-cdimage/ubuntu-core-channels into lp:ubuntu-cdimage

Proposed by Steve Langasek
Status: Merged
Merged at revision: 1705
Proposed branch: lp:~vorlon/ubuntu-cdimage/ubuntu-core-channels
Merge into: lp:ubuntu-cdimage
Diff against target: 61 lines (+17/-1)
4 files modified
lib/cdimage/config.py (+1/-0)
lib/cdimage/livefs.py (+8/-0)
lib/cdimage/tests/test_tree.py (+6/-0)
lib/cdimage/tree.py (+2/-1)
To merge this branch: bzr merge lp:~vorlon/ubuntu-cdimage/ubuntu-core-channels
Reviewer Review Type Date Requested Status
Ubuntu CD Image Team Pending
Review via email: mp+336070@code.launchpad.net

Description of the change

Support has landed in launchpad-buildd and livecd-rootfs (in bionic-proposed) for building ubuntu-core images from a different snap channel than the default of 'edge'. This is the last piece to let us leverage that for automatic builds of images for multiple channels, using a single livefs definition.

To post a comment you must log in.
1705. By Steve Langasek

Explicit test that we construct the correct publication path when using a non-default channel

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/cdimage/config.py'
--- lib/cdimage/config.py 2017-11-08 22:52:38 +0000
+++ lib/cdimage/config.py 2018-01-16 03:16:21 +0000
@@ -256,6 +256,7 @@
256 "UBUNTU_DEFAULTS_LOCALE",256 "UBUNTU_DEFAULTS_LOCALE",
257 "SSH_ORIGINAL_COMMAND",257 "SSH_ORIGINAL_COMMAND",
258 "EXTRA_PPAS",258 "EXTRA_PPAS",
259 "CHANNEL",
259)260)
260261
261262
262263
=== modified file 'lib/cdimage/livefs.py'
--- lib/cdimage/livefs.py 2017-11-16 17:29:08 +0000
+++ lib/cdimage/livefs.py 2018-01-16 03:16:21 +0000
@@ -229,6 +229,14 @@
229 if config["EXTRA_PPAS"]:229 if config["EXTRA_PPAS"]:
230 metadata_override["extra_ppas"] = config["EXTRA_PPAS"].split()230 metadata_override["extra_ppas"] = config["EXTRA_PPAS"].split()
231231
232 if config["CHANNEL"]:
233 try:
234 kwargs["unique_key"] += "_" + config["CHANNEL"]
235 except KeyError:
236 kwargs["unique_key"] = config["CHANNEL"]
237
238 metadata_override["channel"] = config["CHANNEL"]
239
232 if metadata_override:240 if metadata_override:
233 kwargs["metadata_override"] = metadata_override241 kwargs["metadata_override"] = metadata_override
234242
235243
=== modified file 'lib/cdimage/tests/test_tree.py'
--- lib/cdimage/tests/test_tree.py 2017-11-08 04:57:34 +0000
+++ lib/cdimage/tests/test_tree.py 2018-01-16 03:16:21 +0000
@@ -696,6 +696,12 @@
696 self.config.root, "www", "full", "ubuntu-core",696 self.config.root, "www", "full", "ubuntu-core",
697 self.config.core_series, "edge"),697 self.config.core_series, "edge"),
698 self.make_publisher("ubuntu-core", "daily-live").publish_base)698 self.make_publisher("ubuntu-core", "daily-live").publish_base)
699 self.config["CHANNEL"] = 'stable'
700 self.assertEqual(
701 os.path.join(
702 self.config.root, "www", "full", "ubuntu-core",
703 self.config.core_series, "stable"),
704 self.make_publisher("ubuntu-core", "daily-live").publish_base)
699 self.assertEqual(705 self.assertEqual(
700 os.path.join(706 os.path.join(
701 self.config.root, "www", "full", "kubuntu", "daily-live"),707 self.config.root, "www", "full", "kubuntu", "daily-live"),
702708
=== modified file 'lib/cdimage/tree.py'
--- lib/cdimage/tree.py 2017-11-13 16:16:42 +0000
+++ lib/cdimage/tree.py 2018-01-16 03:16:21 +0000
@@ -1709,7 +1709,8 @@
1709 def image_type_dir(self):1709 def image_type_dir(self):
1710 if (self.config.project == "ubuntu-core" and1710 if (self.config.project == "ubuntu-core" and
1711 self.image_type == 'daily-live'):1711 self.image_type == 'daily-live'):
1712 return os.path.join(self.config.core_series, 'edge')1712 channel = self.config.get("CHANNEL", "edge")
1713 return os.path.join(self.config.core_series, channel)
1713 image_type_dir = self.image_type.replace("_", "/")1714 image_type_dir = self.image_type.replace("_", "/")
1714 if (self.config.distribution != "ubuntu" or1715 if (self.config.distribution != "ubuntu" or
1715 not self.config["DIST"].is_latest):1716 not self.config["DIST"].is_latest):

Subscribers

People subscribed via source and target branches