2017-10-06 16:37:22 -05:00
|
|
|
- name: Require npm_command variable
|
|
|
|
fail:
|
|
|
|
msg: npm_command is required for this role
|
|
|
|
when: npm_command is not defined
|
|
|
|
|
|
|
|
- name: Run npm lifecycle command
|
|
|
|
when: npm_command in npm_lifecycle_phases
|
|
|
|
command: "npm {{ npm_command }} --verbose"
|
|
|
|
# Need to set DISPLAY to the value that will be set when the virtual
|
|
|
|
# framebuffer is set up for doing browser tests.
|
|
|
|
environment:
|
|
|
|
DISPLAY: ':99'
|
2018-08-15 08:37:30 +00:00
|
|
|
CI: 'true'
|
2017-10-06 16:37:22 -05:00
|
|
|
args:
|
|
|
|
chdir: "{{ zuul_work_dir }}"
|
|
|
|
|
|
|
|
- name: Run npm custom command
|
|
|
|
when: npm_command not in npm_lifecycle_phases
|
|
|
|
command: "npm run {{ npm_command }} --verbose"
|
|
|
|
# Need to set DISPLAY to the value that will be set when the virtual
|
|
|
|
# framebuffer is set up for doing browser tests.
|
|
|
|
environment:
|
|
|
|
DISPLAY: ':99'
|
2018-08-15 08:37:30 +00:00
|
|
|
CI: 'true'
|
2017-10-06 16:37:22 -05:00
|
|
|
args:
|
|
|
|
chdir: "{{ zuul_work_dir }}"
|