zuul-jobs/roles/npm/tasks/main.yaml
Monty Taylor ad1ce4fc2f
Add base job and roles for javascript
This is in service of getting javascript tarball jobs going.

Change-Id: I20b4b4ce0bdf03c5585ca73471611178c94e2599
2017-10-09 08:32:45 -05:00

25 lines
774 B
YAML

- 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'
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'
args:
chdir: "{{ zuul_work_dir }}"