Commit 79b85079 by Tyler Hallada Committed by GitHub

Insights: Pass THEME_SCSS as an env var to webpack task (#3995)

* Pass THEME_SCSS as an env var to webpack task

* Address PR comments
parent 6f50c2ea
...@@ -330,4 +330,7 @@ ...@@ -330,4 +330,7 @@
- Role: insights - Role: insights
- Removed `bower install` task - Removed `bower install` task
- Replaced r.js build task with webpack build task - Replaced r.js build task with webpack build task
- Removed `./maange.py compress` task - Removed `./maange.py compress` task
\ No newline at end of file
- Role: insights
- Moved `THEME_SCSS` from `INSIGHTS_CONFIG` to `insights_environment`
...@@ -128,7 +128,6 @@ INSIGHTS_CONFIG: ...@@ -128,7 +128,6 @@ INSIGHTS_CONFIG:
# static file config # static file config
STATICFILES_DIRS: ["{{ insights_static_path }}"] STATICFILES_DIRS: ["{{ insights_static_path }}"]
STATIC_ROOT: "{{ COMMON_DATA_DIR }}/{{ insights_service_name }}/staticfiles" STATIC_ROOT: "{{ COMMON_DATA_DIR }}/{{ insights_service_name }}/staticfiles"
THEME_SCSS: '{{ INSIGHTS_THEME_SCSS }}'
RESEARCH_URL: '{{ INSIGHTS_RESEARCH_URL }}' RESEARCH_URL: '{{ INSIGHTS_RESEARCH_URL }}'
OPEN_SOURCE_URL: '{{ INSIGHTS_OPEN_SOURCE_URL }}' OPEN_SOURCE_URL: '{{ INSIGHTS_OPEN_SOURCE_URL }}'
# db config # db config
...@@ -177,6 +176,7 @@ insights_environment: ...@@ -177,6 +176,7 @@ insights_environment:
DJANGO_SETTINGS_MODULE: "analytics_dashboard.settings.production" DJANGO_SETTINGS_MODULE: "analytics_dashboard.settings.production"
ANALYTICS_DASHBOARD_CFG: "{{ COMMON_CFG_DIR }}/{{ insights_service_name }}.yml" ANALYTICS_DASHBOARD_CFG: "{{ COMMON_CFG_DIR }}/{{ insights_service_name }}.yml"
PATH: "{{ insights_nodeenv_bin }}:{{ insights_venv_dir }}/bin:{{ ansible_env.PATH }}" PATH: "{{ insights_nodeenv_bin }}:{{ insights_venv_dir }}/bin:{{ ansible_env.PATH }}"
THEME_SCSS: '{{ INSIGHTS_THEME_SCSS }}'
insights_service_name: insights insights_service_name: insights
......
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
production: yes production: yes
state: latest state: latest
become_user: "{{ insights_user }}" become_user: "{{ insights_user }}"
environment: "{{ insights_environment }}"
tags: tags:
- install - install
- install:app-requirements - install:app-requirements
environment: "{{ insights_environment }}"
- name: migrate - name: migrate
shell: "DB_MIGRATION_USER='{{ COMMON_MYSQL_MIGRATE_USER }}' DB_MIGRATION_PASS='{{ COMMON_MYSQL_MIGRATE_PASS }}' {{ insights_venv_dir }}/bin/python {{ insights_manage }} migrate --noinput" shell: "DB_MIGRATION_USER='{{ COMMON_MYSQL_MIGRATE_USER }}' DB_MIGRATION_PASS='{{ COMMON_MYSQL_MIGRATE_PASS }}' {{ insights_venv_dir }}/bin/python {{ insights_manage }} migrate --noinput"
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
args: args:
chdir: "{{ insights_code_dir }}" chdir: "{{ insights_code_dir }}"
become_user: "{{ insights_user }}" become_user: "{{ insights_user }}"
environment: "{{ insights_environment }}"
tags: tags:
- assets - assets
- assets:gather - assets:gather
......
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