summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2018-11-28 10:21:57 -0500
committerPaul Belanger <pabelanger@redhat.com>2018-11-28 10:21:57 -0500
commit05fa2786afe86e74b45b04e204a6c3df668a2829 (patch)
treecf8880459f4b2a29f2af4e3fcb01ec8376e55b2a
parent9491dcdae81470b04dae00b102fa59a409b36dc4 (diff)
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>
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 28 Nov 2018 18:59:57 +0000 Reviewed-on: https://review.openstack.org/620628 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-rw-r--r--roles/install-yarn/README.rst5
-rw-r--r--roles/install-yarn/defaults/main.yaml1
-rw-r--r--roles/install-yarn/tasks/main.yaml2
3 files changed, 7 insertions, 1 deletions
diff --git a/roles/install-yarn/README.rst b/roles/install-yarn/README.rst
index 0720e97..18ffe38 100644
--- a/roles/install-yarn/README.rst
+++ b/roles/install-yarn/README.rst
@@ -6,3 +6,8 @@ Install yarn from yarnpkg repos
6 :default: {{ zuul.project.src_dir }} 6 :default: {{ zuul.project.src_dir }}
7 7
8 The directory to work in. 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.
diff --git a/roles/install-yarn/defaults/main.yaml b/roles/install-yarn/defaults/main.yaml
index 9739eb1..e49463c 100644
--- a/roles/install-yarn/defaults/main.yaml
+++ b/roles/install-yarn/defaults/main.yaml
@@ -1 +1,2 @@
1zuul_work_dir: "{{ zuul.project.src_dir }}" 1zuul_work_dir: "{{ zuul.project.src_dir }}"
2yarn_lock_file_path: "{{ zuul_work_dir }}/yarn.lock"
diff --git a/roles/install-yarn/tasks/main.yaml b/roles/install-yarn/tasks/main.yaml
index 21e8348..508aede 100644
--- a/roles/install-yarn/tasks/main.yaml
+++ b/roles/install-yarn/tasks/main.yaml
@@ -1,6 +1,6 @@
1- name: Check for yarn.lock file 1- name: Check for yarn.lock file
2 stat: 2 stat:
3 path: "{{ zuul_work_dir }}/yarn.lock" 3 path: "{{ yarn_lock_file_path }}"
4 get_checksum: false 4 get_checksum: false
5 get_mime: false 5 get_mime: false
6 get_md5: false 6 get_md5: false