ensure-yarn: run ensure-nodejs before

YARN needs a modern version of NodeJS and if we don't use the role
to get the latest version, we end up failing on most platforms that
ship an old version of it.

This patch also adds testing to validate that ensure-yarn alone works.

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I83ac09bc5751c85c6f1eac550d289a300ca2255e
This commit is contained in:
Mohammed Naser 2020-04-06 13:54:55 -04:00 committed by Andreas Jaeger
parent f2976b1274
commit 6920617af5
4 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,4 @@
- hosts: all
roles:
- ensure-nodejs
- ensure-yarn
- ensure-javascript-packages

View File

@ -1 +1,6 @@
Install yarn from yarnpkg repos
Install yarn from yarnpkg repos.
This role use the role :zuul:role:`ensure-nodejs` to ensure that
NodeJS is installed. See the documentation for
:zuul:role:`ensure-nodejs` and specify the version of NodeJS to
install.

View File

@ -1,3 +1,7 @@
- name: Install NodeJS
include_role:
name: ensure-nodejs
- name: Gather variables for each operating system
include_vars: "{{ zj_item }}"
with_first_found:

View File

@ -8,6 +8,16 @@
vars:
role_name: ensure-nodejs
- job:
name: zuul-jobs-test-ensure-yarn
description: Test the ensure-yarn role
files:
- roles/ensure-yarn/.*
- roles/ensure-nodejs/.*
- roles/ensure-package-repositories/.*
run: test-playbooks/simple-role-test.yaml
vars:
role_name: ensure-yarn
- job:
name: zuul-jobs-test-fetch-javascript-tarball
@ -37,6 +47,7 @@
check:
jobs: &id001
- zuul-jobs-test-ensure-nodejs
- zuul-jobs-test-ensure-yarn
- zuul-jobs-test-fetch-javascript-tarball
- zuul-jobs-test-fetch-javascript-tarball-synchronize
gate: