98aa9f9bb0
Projects using yarn for dependencies can just run yarn commands instead of npm commands. Add a yarn role that allows a project to do that. Change-Id: I48a722ca55c88c6330114da3a2c035b1f84f92e1
25 lines
787 B
YAML
25 lines
787 B
YAML
- name: Require yarn_command variable
|
|
fail:
|
|
msg: yarn_command is required for this role
|
|
when: yarn_command is not defined
|
|
|
|
- name: Run yarn lifecycle command
|
|
when: yarn_command in yarn_lifecycle_phases
|
|
command: "yarn {{ yarn_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 yarn custom command
|
|
when: yarn_command not in yarn_lifecycle_phases
|
|
command: "yarn run {{ yarn_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 }}"
|