diff --git a/CHANGELOG.md b/CHANGELOG.md index 25ab4efb338..9fa4dd21a40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Add any new changes to the top (right below this line). + - 2022-04-06 + - Role: edxapp + - Added a new `EDXAPP_COMPILE_JSI18N` variable to control whether + to run the `compilejsi18n` management command on edxapp deploy. + Defaults to false. + - 2022-04-06 - Role: simple_theme - Added a new `SIMPLETHEME_I18N_DJANGO` setting to allow operators to provide diff --git a/playbooks/roles/edxapp/defaults/main.yml b/playbooks/roles/edxapp/defaults/main.yml index 07bac68a280..82e4a44677e 100644 --- a/playbooks/roles/edxapp/defaults/main.yml +++ b/playbooks/roles/edxapp/defaults/main.yml @@ -629,6 +629,9 @@ EDXAPP_DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL: True # Whether to run reindex_course on deploy EDXAPP_REINDEX_ALL_COURSES: false +# Whether to run compilejsi18n on deploy +EDXAPP_COMPILE_JSI18N: false + # XML Course related flags EDXAPP_XML_FROM_GIT: false EDXAPP_XML_S3_BUCKET: !!null diff --git a/playbooks/roles/edxapp/tasks/deploy.yml b/playbooks/roles/edxapp/tasks/deploy.yml index 20bc2629757..2270c052c1d 100644 --- a/playbooks/roles/edxapp/tasks/deploy.yml +++ b/playbooks/roles/edxapp/tasks/deploy.yml @@ -381,6 +381,15 @@ when: - celery_worker is not defined +- name: compile JS translations + shell: ". {{ edxapp_app_dir }}/edxapp_env && {{ edxapp_venv_bin }}/python ./manage.py lms --settings={{ edxapp_settings }} compilejsi18n" + args: + chdir: "{{ edxapp_code_dir }}" + become_user: "{{ edxapp_user }}" + when: EDXAPP_COMPILE_JSI18N and celery_worker is not defined + tags: + - assets + # creates the supervisor jobs for the # service variants configured, runs # gather_assets and db migrations