Create yarn_lock_file_path variable for install-yarn

This removes the hardcoded path to yarn.lock and allows a user to define
it manually.

Change-Id: Ib29c7d442fd57e583674ba86bdc0d5edfac844c9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-11-28 10:21:57 -05:00
parent 9491dcdae8
commit 05fa2786af
3 changed files with 7 additions and 1 deletions

View File

@ -6,3 +6,8 @@ Install yarn from yarnpkg repos
:default: {{ zuul.project.src_dir }} :default: {{ zuul.project.src_dir }}
The directory to work in. The directory to work in.
.. zuul:rolevar:: yarn_lock_file_path
:default: {{ zuul_work_dir }}/yarn.lock
Path to yarn.lock file used by a project.

View File

@ -1 +1,2 @@
zuul_work_dir: "{{ zuul.project.src_dir }}" zuul_work_dir: "{{ zuul.project.src_dir }}"
yarn_lock_file_path: "{{ zuul_work_dir }}/yarn.lock"

View File

@ -1,6 +1,6 @@
- name: Check for yarn.lock file - name: Check for yarn.lock file
stat: stat:
path: "{{ zuul_work_dir }}/yarn.lock" path: "{{ yarn_lock_file_path }}"
get_checksum: false get_checksum: false
get_mime: false get_mime: false
get_md5: false get_md5: false