Files
zuul-jobs/zuul.d/js-jobs.yaml
Damian Fajfer 28607bbc26 Remove version defaults for nodejs jobs
According to Matrix room discussion we've stopped putting version
defaults in zuul-jobs at all for new things so I deleted them as it was
interferring with react version updates

Change-Id: Id2e26a6099ba276feb804ce49a6b591282cc2b0c
2025-08-13 13:14:26 +02:00

237 lines
5.7 KiB
YAML

# Jobs listed in js-jobs.rst.
- job:
name: js-build
parent: unittests
description: |
Base job for javascript operations
Responds to these variables:
.. zuul:jobvar:: js_build_command
:default: build
Command to pass to the javascript package manager..
.. zuul:jobvar:: js_build_tool
:default: autodetected
Command to use for running the package manager, such as npm or yarn.
.. zuul:jobvar:: node_version
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.
pre-run: playbooks/javascript/pre.yaml
run: playbooks/javascript/run.yaml
post-run: playbooks/javascript/post.yaml
vars:
js_build_command: build
- job:
name: build-javascript-source-tarball
parent: js-build
description: |
Build a source tarball for a Javascript project
Responds to these variables:
.. zuul:jobvar:: node_version
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: pack
- job:
name: build-javascript-deployment
parent: js-build
description: |
Build javascript web content as it should be deployed. Publishes
a preview site to build logs as well as a tar archive of
that web content.
Responds to these variables:
.. zuul:jobvar:: js_build_command
:default: build
Command to pass to npm.
.. zuul:jobvar:: node_version
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.
post-run: playbooks/javascript/tarball.yaml
- job:
name: publish-javascript-to-netlify
parent: build-javascript-deployment
description: |
Builds javascript site and deploys to netlify.
Responds to these variables:
.. zuul:jobvar:: js_build_command
:default: build
Command to pass to the javascript package manager..
.. zuul:jobvar:: js_build_tool
:default: autodetected
Command to use for running the package manager, such as npm or yarn.
.. zuul:jobvar:: node_version
The version of Node to use. Netlify CLI requires at least v18.
.. zuul:jobvar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Path to operate in.
.. zuul:jobvar:: javascript_content_dir
:default: public
Directory, relative to zuul_work_dir, holding build content.
.. zuul:jobvar:: netlify_site_id
Site id for the site to publish. This can be found on the site
general settings page as ``API Id``.
.. zuul:rolevar:: netlify_auth
:type: dict
Complex argument which contains the netlify authentication credentials.
This is expected to come from a secret.
.. zuul:rolevar:: token
API token to use to publish the content. Instructions for creating
a token can be found at
https://docs.netlify.com/cli/get-started/#obtain-a-token-in-the-netlify-ui
post-run: playbooks/javascript/netlify-publish.yaml
- job:
name: nodejs-run-test
parent: js-build
description: |
Run test using nodejs.
Responds to these variables:
.. zuul:jobvar:: node_version
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.
Responds to these variables:
.. zuul:jobvar:: node_version
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.
pre-run: playbooks/javascript/browser.yaml
vars:
js_build_command: test
- job:
name: nodejs-run-lint
parent: js-build
description: |
Run lint using nodejs.
Responds to these variables:
.. zuul:jobvar:: node_version
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: lint
- job:
name: nodejs-run-docs
parent: js-build
description: |
Run docs using nodejs.
Responds to these variables:
.. zuul:jobvar:: node_version
The version of Node to use.
.. zuul:jobvar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Path to operate in.
post-run: playbooks/tox/docs-post.yaml
vars:
js_build_command: docs