Skip to content

Commit f9609bc

Browse files
feat: first attempt
1 parent 08f778b commit f9609bc

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Diff for: playbooks/roles/edxapp/defaults/main.yml

+11
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,17 @@ EDXAPP_PRIVATE_REQUIREMENTS:
585585
# Caliper and xAPI event routing plugin
586586
- name: edx-event-routing-backends==5.5.6
587587

588+
# List of additional npm packages that should be installed into the
589+
# edxapp virtual environment.
590+
# `name` (required) and `version_range` (optional) are supported and
591+
# correspond to the options of ansible's pip module.
592+
# Example:
593+
# EDXAPP_EXTRA_NPM_REQUIREMENTS:
594+
# - name: mypackage
595+
# version_range: ^1.0.0
596+
# - name: git+https://git.myproject.org/MyProject#egg=MyProject
597+
EDXAPP_EXTRA_NPM_REQUIREMENTS: []
598+
588599
# List of custom middlewares that should be used in edxapp to process
589600
# incoming HTTP resquests. Should be a list of plain strings that fully
590601
# qualify Python classes or functions that can be used as Django middleware.

Diff for: playbooks/roles/edxapp/tasks/deploy.yml

+11
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,17 @@
317317
- install
318318
- install:app-requirements
319319

320+
- name: Install private node dependencies
321+
shell: "easy_install --version && npm install {{ item.name }}{{ '@' + item.version_range if item.version_range is defined else '' }}"
322+
with_items: "{{ EDXAPP_EXTRA_NPM_REQUIREMENTS }}"
323+
args:
324+
chdir: "{{ edxapp_code_dir }}"
325+
environment: "{{ edxapp_environment | combine(git_ssh_environment_mixin) }}"
326+
become_user: "{{ edxapp_user }}"
327+
tags:
328+
- install
329+
- install:app-requirements
330+
320331
# The next few tasks set up the python code sandbox
321332

322333
# need to disable this profile, otherwise the pip inside the sandbox venv has no permissions

0 commit comments

Comments
 (0)