Skip to content

Commit

Permalink
build: deprecate paver from update_assets jinja script
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Nov 26, 2024
1 parent 62fc6a0 commit 8893357
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion playbooks/roles/aws_devstack/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
cd edx-repos/devstack/
make dev.pull.large-and-slow
make dev.up.lms
. /home/ubuntu/.profile && docker compose exec lms env TERM=xterm-256color bash -c 'make requirements && npm ci && npm run build && ./manage.py lms collectstatic --noinput && ./manage.py cms collectstatic && python manage.py lms migrate'
. /home/ubuntu/.profile && docker compose exec lms env TERM=xterm-256color bash -c 'make requirements && npm ci && npm run build && ./manage.py lms collectstatic --noinput && ./manage.py cms collectstatic --noinput && python manage.py lms migrate'
async: 1800
poll: 10
become_user: ubuntu
Expand Down
22 changes: 18 additions & 4 deletions playbooks/roles/edxapp/templates/edx/bin/edxapp-update-assets.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
{% if edxapp_staticfiles_storage_overrides %}
{% for override in edxapp_staticfiles_storage_overrides %}
sudo -E -H -u {{ edxapp_user }} \
env "PATH=$PATH" "STATICFILES_STORAGE={{ override }}" \
npm run build && {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS && {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS
env "PATH=$PATH" \
"STATICFILES_STORAGE={{ override }}" \
"STATIC_ROOT=/edx/var/edxapp/staticfiles" \
"STATIC_ROOT_LMS=/edx/var/edxapp/staticfiles" \
"STATIC_ROOT_CMS=/edx/var/edxapp/staticfiles/studio" \
npm install \
&& npm run webpack --config webpack.config.js \
&& npm run compile-sass \
&& {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS \
&& {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS
{% endfor %}
{% else %}
sudo -E -H -u {{ edxapp_user }} \
env "PATH=$PATH" \
npm run build && {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS && {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS
"STATIC_ROOT=/edx/var/edxapp/staticfiles" \
"STATIC_ROOT_LMS=/edx/var/edxapp/staticfiles" \
"STATIC_ROOT_CMS=/edx/var/edxapp/staticfiles/studio" \
npm install \
&& npm run webpack --config webpack.config.js \
&& npm run compile-sass \
&& {{ edxapp_venv_bin }}/python manage.py lms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS \
&& {{ edxapp_venv_bin }}/python manage.py cms collectstatic --noinput --settings=$EDX_PLATFORM_SETTINGS
{% endif %}

0 comments on commit 8893357

Please sign in to comment.