← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~jugmac00/launchpad-buildd:add-support-for-conda-channels into launchpad-buildd:master

 

Jürgen Gmach has proposed merging ~jugmac00/launchpad-buildd:add-support-for-conda-channels into launchpad-buildd:master.

Commit message:
Add support for Conda channels

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jugmac00/launchpad-buildd/+git/launchpad-buildd/+merge/424378
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad-buildd:add-support-for-conda-channels into launchpad-buildd:master.
diff --git a/lpbuildd/ci.py b/lpbuildd/ci.py
index 7b334d6..4cb5af7 100644
--- a/lpbuildd/ci.py
+++ b/lpbuildd/ci.py
@@ -60,6 +60,7 @@ class CIBuildManager(BuildManagerProxyMixin, DebianBuildManager):
         self.job_status = {}
         self.apt_repositories = extra_args.get("apt_repositories")
         self.environment_variables = extra_args.get("environment_variables")
+        self.plugin_settings = extra_args.get("plugin_settings")
 
         super().initiate(files, chroot, extra_args)
 
@@ -144,6 +145,10 @@ class CIBuildManager(BuildManagerProxyMixin, DebianBuildManager):
             for key, value in self.environment_variables.items():
                 args.extend(
                     ["--environment-variable", f"{key}={value}"])
+        if self.plugin_settings is not None:
+            for key, value in self.plugin_settings.items():
+                args.extend(
+                    ["--plugin_setting", f"{key}={value}"])
         job_name, job_index = self.current_job
         self.current_job_id = _make_job_id(job_name, job_index)
         args.extend([job_name, str(job_index)])
diff --git a/lpbuildd/target/run_ci.py b/lpbuildd/target/run_ci.py
index 5920346..f20cf52 100644
--- a/lpbuildd/target/run_ci.py
+++ b/lpbuildd/target/run_ci.py
@@ -125,14 +125,23 @@ class RunCI(BuilderProxyOperationMixin, Operation):
             self.args.job_name,
             str(self.args.job_index),
         ]
+        for repository in self.args.apt_repositories:
+            lpcraft_args.extend(["--apt-replace-repositories", repository])
+
         environment_variables = dict(
             pair.split("=", maxsplit=1)
             for pair in self.args.environment_variables
         )
         for key, value in environment_variables.items():
             lpcraft_args.extend(["--set-env", "%s=%s" % (key, value)])
-        for repository in self.args.apt_repositories:
-            lpcraft_args.extend(["--apt-replace-repositories", repository])
+
+        plugin_settings = dict(
+            pair.split("=", maxsplit=1)
+            for pair in self.args.plugin_settings
+        )
+        for key, value in plugin_settings.items():
+            lpcraft_args.extend(["--plugin_setting", "%s=%s" % (key, value)])
+
         escaped_lpcraft_args = (
             " ".join(shell_escape(arg) for arg in lpcraft_args))
         tee_args = ["tee", "%s.log" % output_path]

References