Skip to content

Commit 5ff5012

Browse files
Merge pull request #230 from edx/ttak-apphelix/add-npm-aliases-for-edxapp
chore: add NPM aliases installation to deployment process
2 parents 6ee8718 + 4d33b01 commit 5ff5012

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

playbooks/roles/edxapp/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,8 @@ edxapp_npm_bin: "{{ edxapp_npm_dir }}/bin"
11351135
edxapp_settings: '{{ EDXAPP_SETTINGS }}'
11361136
EDXAPP_NODE_VERSION: "20"
11371137
EDXAPP_NPM_VERSION: "10.7.0"
1138+
NPM_ALIASES:
1139+
"@edx/brand": "npm:@edx/brand-edx.org@^2.1.3"
11381140
# This is where node installs modules, not node itself
11391141
edxapp_node_bin: "{{ edxapp_code_dir }}/node_modules/.bin"
11401142
edxapp_user: edxapp

playbooks/roles/edxapp/tasks/deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,18 @@
314314
- install
315315
- install:app-requirements
316316

317+
- name: Install NPM aliases
318+
shell: >
319+
npm install {{ item.key }}@{{ item.value }} --no-save
320+
args:
321+
chdir: "{{ edxapp_code_dir }}"
322+
environment: "{{ edxapp_environment | combine(git_ssh_environment_mixin) }}"
323+
become_user: "{{ edxapp_user }}"
324+
with_dict: "{{ NPM_ALIASES }}"
325+
tags:
326+
- install
327+
- install:app-requirements
328+
317329
# The next few tasks set up the python code sandbox
318330

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

0 commit comments

Comments
 (0)