Skip to content

Commit

Permalink
Merge pull request openedx-unsupported#2676 from fghaas/comprehensive…
Browse files Browse the repository at this point in the history
…-theme

Support externally hosted comprehensive themes
  • Loading branch information
feanil committed Feb 12, 2016
2 parents 312ff0a + 48fd551 commit 43e2f6f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ Steven Burch <stv@stanford.edu>
Dan Powell <dan@abakas.com>
Omar Al-Ithawi <oithawi@qrf.org>
David Adams<dcadams@stanford.edu>
Florian Haas <florian@hastexo.com>
7 changes: 7 additions & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,14 @@ EDXAPP_PROCTORING_BACKEND_PROVIDER:
options: {}

# Comprehensive Theming
# Full path to the comprehensive theme directory
EDXAPP_COMPREHENSIVE_THEME_DIR: ""
# Git repo for the comprehensive theme (if using a comprehensive theme
# other than the ones bundled with edx/platform)
EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO: ""
# Git branch, tag, or revision to check out from
# EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO
EDXAPP_COMPREHENSIVE_THEME_VERSION: ""

# SAML KEYS
EDXAPP_SOCIAL_AUTH_SAML_SP_PRIVATE_KEY: ''
Expand Down
27 changes: 26 additions & 1 deletion playbooks/roles/edxapp/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@
- install
- install:code

- name: checkout theme
# edX supports two theme types, Comprehensive themes and the older
# Stanford-style themes. They are mutually exclusive.
#
# To enable Stanford theming, point edxapp_theme_source_repo
# (yes, lowercase) to a Stanford-style theme and set
# edxapp_theme_name (again, lowercase) to its name.
- name: checkout Stanford-style theme
git: >
dest={{ edxapp_app_dir }}/themes/{{ edxapp_theme_name }}
repo={{ edxapp_theme_source_repo }}
Expand All @@ -98,6 +104,25 @@
- install
- install:code

# To enable Comprehensive theming, point
# EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO to your theme repo, and set
# EDXAPP_COMPREHENSIVE_THEME_DIR to the directory you want to check
# out to.
- name: checkout comprehensive theme
git: >
dest={{ EDXAPP_COMPREHENSIVE_THEME_DIR }}
repo={{ EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO }}
version={{ EDXAPP_COMPREHENSIVE_THEME_VERSION }}
accept_hostkey=yes
when: EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO != ''
sudo_user: "{{ edxapp_user }}"
environment:
GIT_SSH: "{{ edxapp_git_ssh }}"
register: edxapp_theme_checkout
tags:
- install
- install:code

- name: Stat each requirements file with Github URLs to ensure it exists
stat: path="{{ item }}"
with_items: "{{ edxapp_requirements_with_github_urls }}"
Expand Down

0 comments on commit 43e2f6f

Please sign in to comment.