Commit 2927a399 by John Jarvis

Merge pull request #397 from edx/jarv/gather-assets-fix

Jarv/gather assets fix
parents 7d4a36ac e6281209
...@@ -138,14 +138,9 @@ edxapp_workers: ...@@ -138,14 +138,9 @@ edxapp_workers:
edxapp_all_req_files: edxapp_all_req_files:
- "{{ pre_requirements_file }}" - "{{ pre_requirements_file }}"
- "{{ post_requirements_file }}" - "{{ post_requirements_file }}"
- "{{ repo_requirements_file }}" - "{{ base_requirements_file }}"
- "{{ github_requirements_file }}"
- "{{ local_requirements_file }}"
- "{{ sandbox_base_requirements }}"
- "{{ sandbox_local_requirements }}"
- "{{ sandbox_post_requirements }}" - "{{ sandbox_post_requirements }}"
- "{{ edxapp_code_dir }}/package.json" - "{{ sandbox_base_requirements }}"
- "{{ edxapp_code_dir }}/Gemfile"
# TODO: old style variable syntax is necessary # TODO: old style variable syntax is necessary
# for lists and dictionaries # for lists and dictionaries
......
...@@ -32,16 +32,16 @@ ...@@ -32,16 +32,16 @@
git: dest={{edxapp_code_dir}} repo={{edx_platform_repo}} version={{edx_platform_commit}} git: dest={{edxapp_code_dir}} repo={{edx_platform_repo}} version={{edx_platform_commit}}
register: chkout register: chkout
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags: deploy
- deploy
- name: edxapp | git clean after checking out edx-platform - name: edxapp | git clean after checking out edx-platform
shell: cd {{edxapp_code_dir}} && git clean -xdf shell: cd {{edxapp_code_dir}} && git clean -xdf
when: chkout.changed
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: tags: deploy
- deploy
- name: edxapp | compiling all py files in the edx-platform repo
shell: "{{ edxapp_venv_bin }}/python -m compileall {{ edxapp_code_dir }}"
tags: deploy
- name: edxapp | checkout theme - name: edxapp | checkout theme
git: dest={{ edxapp_app_dir }}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}} git: dest={{ edxapp_app_dir }}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}}
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
/usr/bin/md5sum {{ " ".join(edxapp_all_req_files) }} 2>/dev/null > /var/tmp/edxapp.req.new /usr/bin/md5sum {{ " ".join(edxapp_all_req_files) }} 2>/dev/null > /var/tmp/edxapp.req.new
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
ignore_errors: true ignore_errors: true
when: chkout.changed
tags: tags:
- deploy - deploy
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
/bin/sed -i -e 's/github\.com/{{ COMMON_GIT_MIRROR }}/g' {{ item }} /bin/sed -i -e 's/github\.com/{{ COMMON_GIT_MIRROR }}/g' {{ item }}
with_items: edxapp_all_req_files with_items: edxapp_all_req_files
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
...@@ -85,7 +84,6 @@ ...@@ -85,7 +84,6 @@
executable=/bin/bash executable=/bin/bash
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
- name: edxapp | bundle install - name: edxapp | bundle install
...@@ -95,7 +93,6 @@ ...@@ -95,7 +93,6 @@
executable=/bin/bash executable=/bin/bash
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
# Node play that need to be run after platform updates. # Node play that need to be run after platform updates.
...@@ -103,7 +100,6 @@ ...@@ -103,7 +100,6 @@
shell: npm install chdir={{ edxapp_code_dir }} shell: npm install chdir={{ edxapp_code_dir }}
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
...@@ -116,7 +112,7 @@ ...@@ -116,7 +112,7 @@
extra_args="-i {{ edxapp_pypi_local_mirror }}" extra_args="-i {{ edxapp_pypi_local_mirror }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
# Install the python modules into {{ edxapp_venv_dir }} # Install the python modules into {{ edxapp_venv_dir }}
...@@ -129,7 +125,7 @@ ...@@ -129,7 +125,7 @@
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
# Install the python post requirements into {{ edxapp_venv_dir }} # Install the python post requirements into {{ edxapp_venv_dir }}
...@@ -141,7 +137,7 @@ ...@@ -141,7 +137,7 @@
extra_args="-i {{ edxapp_pypi_local_mirror }}" extra_args="-i {{ edxapp_pypi_local_mirror }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
# Install the final python modules into {{ edxapp_venv_dir }} # Install the final python modules into {{ edxapp_venv_dir }}
...@@ -155,7 +151,6 @@ ...@@ -155,7 +151,6 @@
- "{{ github_requirements_file }}" - "{{ github_requirements_file }}"
- "{{ local_requirements_file }}" - "{{ local_requirements_file }}"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
...@@ -171,13 +166,12 @@ ...@@ -171,13 +166,12 @@
- "{{ sandbox_post_requirements }}" - "{{ sandbox_post_requirements }}"
when: install_sandbox_reqs_into_regular_venv when: install_sandbox_reqs_into_regular_venv
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed and not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy tags: deploy
- name: edxapp | create checksum for installed requirements - name: edxapp | create checksum for installed requirements
shell: cp /var/tmp/edxapp.req.new /var/tmp/edxapp.req.installed shell: cp /var/tmp/edxapp.req.new /var/tmp/edxapp.req.installed
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed
tags: deploy tags: deploy
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
executable=/bin/bash executable=/bin/bash
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
when: chkout.changed and celery_worker is not defined when: celery_worker is not defined
with_items: service_variants_enabled with_items: service_variants_enabled
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
tags: tags:
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
- name: edxapp | syncdb and migrate - name: edxapp | syncdb and migrate
shell: sudo -u {{ edxapp_user }} SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }} shell: sudo -u {{ edxapp_user }} SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when: chkout and migrate_db is defined and migrate_db|lower == "yes" when: migrate_db is defined and migrate_db|lower == "yes"
tags: tags:
- deploy - deploy
- name: edxapp | db migrate - name: edxapp | db migrate
shell: sudo -u {{ edxapp_user }} SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }} shell: sudo -u {{ edxapp_user }} SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when: chkout.changed and migrate_only is defined and migrate_only|lower == "yes" when: migrate_only is defined and migrate_only|lower == "yes"
tags: tags:
- deploy - deploy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment