Skip to content

Commit 12762ed

Browse files
authored
feat: Add support for mounting openedx-platform (#1344)
This is the new name for `edx-platform`. Mounting the old name will continue to work for now. The path of the repo in the image and container is still /openedx/edx-platform for now. Changing this might be a breaking change for many plugins, so it's unclear if/when we will change that path. Part of openedx/openedx-platform#37904
1 parent 1a69d67 commit 12762ed

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- [Feature] Add support for mounting `openedx-platform`, the which is new name of `edx-platform`. Mounting by the old name, `edx-platform`, will continue to work for now as well (by @kdmccormick).

tutor/plugins/openedx.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _mount_edx_platform_build(
8080
Automatically add an edx-platform repo from the host to the build context whenever
8181
it is added to the `MOUNTS` setting.
8282
"""
83-
if os.path.basename(path) == "edx-platform":
83+
if os.path.basename(path) in ["edx-platform", "openedx-platform"]:
8484
volumes += [
8585
("openedx", "edx-platform"),
8686
("openedx-dev", "edx-platform"),
@@ -96,7 +96,7 @@ def _mount_edx_platform_compose(
9696
When mounting edx-platform with `tutor mounts add /path/to/edx-platform`,
9797
bind-mount the host repo in the lms/cms containers.
9898
"""
99-
if name == "edx-platform":
99+
if name in ["edx-platform", "openedx-platform"]:
100100
path = "/openedx/edx-platform"
101101
volumes.append(("openedx", path))
102102
return volumes
@@ -109,7 +109,10 @@ def _mount_edx_platform_compose(
109109
("openedx", "edx-enterprise"),
110110
("openedx", "edx-ora2"),
111111
("openedx", "edx-search"),
112-
("openedx", r"openedx-.*"),
112+
(
113+
"openedx",
114+
r"openedx-(?!platform)(.*)",
115+
), # any openedx-* repo except openedx-platform
113116
("openedx", "opaque-keys"),
114117
("openedx", r"platform-plugin-.*"),
115118
]

0 commit comments

Comments
 (0)