launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28578
[Merge] ~jugmac00/launchpad:add-support-for-conda-channels into launchpad:master
Jürgen Gmach has proposed merging ~jugmac00/launchpad:add-support-for-conda-channels into launchpad: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/+git/launchpad/+merge/424376
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad:add-support-for-conda-channels into launchpad:master.
diff --git a/lib/lp/code/model/cibuildbehaviour.py b/lib/lp/code/model/cibuildbehaviour.py
index db860ac..16eece6 100644
--- a/lib/lp/code/model/cibuildbehaviour.py
+++ b/lib/lp/code/model/cibuildbehaviour.py
@@ -71,6 +71,21 @@ def build_apt_repositories(distribution_name: str) -> list:
return rv
+def build_plugin_settings(distribution_name: str) -> dict:
+ # - load key/value pairs from JSON Object
+ # - replace authentication placeholder
+ try:
+ pairs = config["cibuild."+distribution_name]["plugin_settings"]
+ except NoSectionError:
+ return {}
+ if pairs is None:
+ return {}
+ rv = {}
+ for key, value in json.loads(pairs).items():
+ rv[key] = replace_auth_placeholder(value)
+ return rv
+
+
@adapter(ICIBuild)
@implementer(IBuildFarmJobBehaviour)
class CIBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
@@ -140,6 +155,8 @@ class CIBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
distribution_name)
args["apt_repositories"] = build_apt_repositories(
distribution_name)
+ args["plugin_settings"] = build_plugin_settings(
+ distribution_name)
return args
def verifySuccessfulBuild(self):
diff --git a/lib/lp/services/config/schema-lazr.conf b/lib/lp/services/config/schema-lazr.conf
index 5cb262c..0fd3d27 100644
--- a/lib/lp/services/config/schema-lazr.conf
+++ b/lib/lp/services/config/schema-lazr.conf
@@ -245,6 +245,9 @@ environment_variables: none
# example:
# apt_repositories: ["deb https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-deb-stable focal main universe"]
apt_repositories: none
+# value is a JSON Object
+# example:
+# plugin_settings: {"miniconda_conda_channel": "https://%(read_auth)s@xxxxxxxxxxxxxxxxxxxxx/artifactory/soss-conda-stable-local/"}
[codebrowse]
References