Browse Source

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>
Paul Belanger 4 months ago
parent
commit
05fa2786af

+ 5
- 0
roles/install-yarn/README.rst View File

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

+ 1
- 0
roles/install-yarn/defaults/main.yaml View File

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

+ 1
- 1
roles/install-yarn/tasks/main.yaml View File

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

Loading…
Cancel
Save