6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-13 14:43:03 +00:00

feat: cleaner git tree in openedx Docker image

With "git patch", the resulting source tree was dirty, showing uncommitted
changes. Here, we replace "git patch" with "git cherry-pick". We avoid pulling
the entire remote repo by fetching individual commits. To do that, we need to
assign an identity to the git user.
This commit is contained in:
Régis Behmo 2021-09-09 16:23:11 +02:00 committed by Régis Behmo
parent d3bfc4fb87
commit ca3aabedce
2 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased ## Unreleased
- [Improvement] In the "openedx" Docker images, convert git patches to cherry-picks for a cleaner source tree.
- 💥[Feature] Make it possible to override local job configuration. This deprecates the older model for running jobs which dates back from a long time ago. - 💥[Feature] Make it possible to override local job configuration. This deprecates the older model for running jobs which dates back from a long time ago.
## v12.0.4 (2021-08-12) ## v12.0.4 (2021-08-12)

View File

@ -35,13 +35,17 @@ RUN mkdir -p /openedx/edx-platform && \
git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform
WORKDIR /openedx/edx-platform WORKDIR /openedx/edx-platform
# Identify tutor user to cherry-pick commits
RUN git config --global user.email "tutor@overhang.io" \
&& git config --global user.name "Tutor"
{% if patch("openedx-dockerfile-git-patches-default") %} {% if patch("openedx-dockerfile-git-patches-default") %}
# Custom edx-platform patches # Custom edx-platform patches
{{ patch("openedx-dockerfile-git-patches-default") }} {{ patch("openedx-dockerfile-git-patches-default") }}
{% else %} {% else %}
# Patch edx-platform # Patch edx-platform
# RUN curl --silent https://github.com/overhangio/edx-platform/commit/<sha1>.patch | git apply - # Security patch: https://github.com/edx/edx-platform/pull/28442
RUN curl --silent https://github.com/overhangio/edx-platform/commit/8ecc1903ca9170a719c0e63e99fb231822eb26d8.patch | git apply - RUN git fetch https://github.com/edx/edx-platform 8ecc1903ca9170a719c0e63e99fb231822eb26d8 && git cherry-pick 8ecc1903ca9170a719c0e63e99fb231822eb26d8
{% endif %} {% endif %}
###### Download extra locales to /openedx/locale/contrib/locale ###### Download extra locales to /openedx/locale/contrib/locale