From 0caa85cc48e4f1fcec5b34fce24fe296676efe6f Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 12 May 2020 10:32:04 -0500 Subject: [PATCH] Split browser and non-browser targetting js test jobs Some javascript operations, like running tests for web-apps, need browsers. Javascript packages that are not targetting browsers do not. Make a -browser version that installs the browsers and xvfb, and a non-browser version that does not. Change-Id: I33c12cb0d9516bdffef7d8d04af4dbcb03ed8355 --- doc/source/js-jobs.rst | 1 + .../{pre-test.yaml => browser.yaml} | 0 zuul.d/js-jobs.yaml | 27 ++++++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) rename playbooks/javascript/{pre-test.yaml => browser.yaml} (100%) diff --git a/doc/source/js-jobs.rst b/doc/source/js-jobs.rst index 5ece2681c..a0e345011 100644 --- a/doc/source/js-jobs.rst +++ b/doc/source/js-jobs.rst @@ -6,5 +6,6 @@ Javascript Jobs .. zuul:autojob:: build-javascript-deployment-tarball .. zuul:autojob:: js-build .. zuul:autojob:: nodejs-run-test +.. zuul:autojob:: nodejs-run-test-browser .. zuul:autojob:: nodejs-run-lint .. zuul:autojob:: nodejs-run-docs diff --git a/playbooks/javascript/pre-test.yaml b/playbooks/javascript/browser.yaml similarity index 100% rename from playbooks/javascript/pre-test.yaml rename to playbooks/javascript/browser.yaml diff --git a/zuul.d/js-jobs.yaml b/zuul.d/js-jobs.yaml index ac20431df..e33d4e8a0 100644 --- a/zuul.d/js-jobs.yaml +++ b/zuul.d/js-jobs.yaml @@ -129,6 +129,31 @@ - job: name: nodejs-run-test parent: js-build + description: | + Run test using nodejs. + + Responds to these variables: + + .. zuul:jobvar:: node_version + :default: 14 + + The version of Node to use. + + .. zuul:jobvar:: zuul_work_dir + :default: {{ zuul.project.src_dir }} + + Path to operate in. + + .. zuul:jobvar:: javascript_content_dir + :default: dist + + Directory, relative to zuul_work_dir, holding build content. + vars: + js_build_command: test + +- job: + name: nodejs-run-test-browser + parent: js-build description: | Run test using nodejs. This test also starts Xvfb for run time tests. @@ -149,7 +174,7 @@ :default: dist Directory, relative to zuul_work_dir, holding build content. - pre-run: playbooks/javascript/pre-test.yaml + pre-run: playbooks/javascript/browser.yaml vars: js_build_command: test