launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24227
[Merge] lp:~sil2100/launchpad-buildd/pass_build_id into lp:launchpad-buildd
Łukasz Zemczak has proposed merging lp:~sil2100/launchpad-buildd/pass_build_id into lp:launchpad-buildd.
Commit message:
Pass the build_id parameter to the livefs build. This parameter can be used for instance to pass the cdimage build timestamp to the actual build, which then can be used by ubuntu-image to populate .disk/info.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~sil2100/launchpad-buildd/pass_build_id/+merge/377635
Pass the build_id parameter to the livefs build. This parameter can be used for instance to pass the cdimage build timestamp to the actual build, which then can be used by ubuntu-image to populate .disk/info.
I'm really bad at naming, so if anyone thinks that build_id is *not* the right way to call this parameter, please shout (we'll have to change it in all the various places then). Just seemed to fit as this is how it's *sometimes* called on cdimage.
This way we can have something like .disk/info on our preinstalled images built by ubuntu-image, which would make it much easier for users and testers to identify which image they are using.
This MP is part of a set of changes in ubuntu-image, livecd-rootfs and ubuntu-cdimage.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sil2100/launchpad-buildd/pass_build_id into lp:launchpad-buildd.
=== modified file 'lpbuildd/livefs.py'
--- lpbuildd/livefs.py 2019-10-02 10:30:04 +0000
+++ lpbuildd/livefs.py 2020-01-15 11:57:20 +0000
@@ -43,6 +43,7 @@
self.extra_ppas = extra_args.get("extra_ppas", [])
self.extra_snaps = extra_args.get("extra_snaps", [])
self.channel = extra_args.get("channel")
+ self.build_id = extra_args.get("build_id")
self.image_targets = extra_args.get("image_targets", [])
self.repo_snapshot_stamp = extra_args.get("repo_snapshot_stamp")
self.cohort_key = extra_args.get("cohort-key")
@@ -73,6 +74,8 @@
args.extend(["--extra-snap", snap])
if self.channel:
args.extend(["--channel", self.channel])
+ if self.build_id:
+ args.extend(["--build_id", self.build_id])
for image_target in self.image_targets:
args.extend(["--image-target", image_target])
if self.repo_snapshot_stamp:
=== modified file 'lpbuildd/target/build_livefs.py'
--- lpbuildd/target/build_livefs.py 2019-12-16 19:23:47 +0000
+++ lpbuildd/target/build_livefs.py 2020-01-15 11:57:20 +0000
@@ -76,6 +76,9 @@
"--channel", metavar="CHANNEL",
help="pull snaps from channel CHANNEL for ubuntu-core image")
parser.add_argument(
+ "--build_id", metavar="BUILD_ID",
+ help="optional build ID to be passed to the image build")
+ parser.add_argument(
"--http-proxy", action="store", help="use this HTTP proxy for apt")
parser.add_argument(
"--debug", default=False, action="store_true",
@@ -136,6 +139,8 @@
base_lb_env["SUBARCH"] = self.args.subarch
if self.args.channel is not None:
base_lb_env["CHANNEL"] = self.args.channel
+ if self.args.build_id is not None:
+ base_lb_env["BUILD_ID"] = self.args.build_id
if self.args.image_targets:
base_lb_env["IMAGE_TARGETS"] = " ".join(
self.args.image_targets)
Follow ups