From 5b67b111ca3dd5b45caf1ef8f2ae8070487a00cc Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 22 Jun 2020 13:33:38 -0500 Subject: [PATCH] Switch node tests to inherit nodejs-run-test-browser. Current base of nodjs-npm-run-test is deprecated. We need to switch to the newer base job to pick up new behavior. Horizon npm tests require a browser so the job inherit nodejs-run-test-browser now. In addition, tox is not anymore pre-installed on the OpenDev CI images. npm jobs in horizon need tox, so we need to install it in pre-run phase. Change-Id: Iffa3f7631bec0a5f7b0c701df87305725cae5708 Signed-off-by: Sean McGinnis Co-Authored-By: Akihiro Motoki --- .zuul.d/cross-jobs.yaml | 3 ++- playbooks/nodejs-pre.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 playbooks/nodejs-pre.yaml diff --git a/.zuul.d/cross-jobs.yaml b/.zuul.d/cross-jobs.yaml index 977c1a3907..affeb53ab5 100644 --- a/.zuul.d/cross-jobs.yaml +++ b/.zuul.d/cross-jobs.yaml @@ -23,7 +23,7 @@ - job: name: requirements-cross-npm - parent: nodejs-npm-run-test + parent: nodejs-run-test-browser timeout: 2400 description: | A parent job to perform cross-repository npm tests. @@ -39,6 +39,7 @@ vars: zuul_work_dir: "{{ (zuul.projects.values() | selectattr('required') | selectattr('name', 'match', '^(?!openstack/requirements)') | list)[0].src_dir }}" tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" + pre-run: playbooks/nodejs-pre.yaml files: - upper-constraints.txt - .zuul.d/cross-jobs.yaml diff --git a/playbooks/nodejs-pre.yaml b/playbooks/nodejs-pre.yaml new file mode 100644 index 0000000000..b346b04629 --- /dev/null +++ b/playbooks/nodejs-pre.yaml @@ -0,0 +1,6 @@ +- hosts: all + roles: + # package.json needs to run 'tox' as command, ensure that it's + # installed and can be used globally. + - role: ensure-tox + ensure_global_symlinks: True