zuul-jobs/zuul-tests.d/js-roles-jobs.yaml
Clark Boylan efa55f881d Modernize ensure-nodejs
The ensure-nodejs role defaults to install nodejs 6 which produces this
error currently:

  Failed to update apt cache: W:The repository
  'https://deb.nodesource.com/node_6.x noble Release' does not have a
  Release file., W:Data from such a repository can't be authenticated
  and is therefore potentially dangerous to use.

We need to make a few changes to bring this ensure-nodejs role up to
modern expectations for nodesource usage. First we drop the default
nodejs version from ensure-nodejs. Everyone is already setting this
value to make this role work or they are broken and will need to change
something anyway. This gets us off of the nodejs update treadmill in
this role.

Then with nodejs 16 and newer there is a new gpg key and no deb-src
packages so we need to change the apt configuration if using 16 and
newer. We make these changes to match the corresponding setup_16.x etc
scripts from nodesource.

Change-Id: I0d5c93e4fbcee0be2cc477bf9f625e419a2b9bd1
2024-09-18 16:46:00 -07:00

144 lines
4.4 KiB
YAML

- job:
name: zuul-jobs-test-ensure-nodejs
description: Test the ensure-nodejs role
files:
- roles/ensure-nodejs/.*
- roles/ensure-package-repositories/.*
run: test-playbooks/simple-role-test.yaml
vars:
role_name: ensure-nodejs
node_version: 20
- 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
node_version: 20
- job:
name: zuul-jobs-test-fetch-javascript-tarball
description: Test the fetch-javascript-tarball
files:
- roles/fetch-javascript-tarball/.*
- roles/fetch-output/.*
run: test-playbooks/javascripts/fetch-javascript-tarball.yaml
vars:
zuul_use_fetch_output: true
- job:
name: zuul-jobs-test-fetch-javascript-tarball-synchronize
description: Test the fetch-javascript-tarball without fetch-output
files:
- roles/fetch-javascript-tarball/.*
run: test-playbooks/javascripts/fetch-javascript-tarball.yaml
vars:
zuul_use_fetch_output: false
- job:
name: zuul-jobs-test-nodejs-test-dependencies
description: Test the installation of nodejs test dependencies
tags: debuntu-platforms
files:
- roles/nodejs-test-dependencies/.*
run: test-playbooks/simple-role-test.yaml
vars:
role_name: nodejs-test-dependencies
- job:
name: zuul-jobs-test-nodejs-test-dependencies-debian-bookworm
description: Test the installation of nodejs test dependencies on debian-bookworm
parent: zuul-jobs-test-nodejs-test-dependencies
tags: auto-generated
nodeset:
nodes:
- name: debian-bookworm
label: debian-bookworm
- job:
name: zuul-jobs-test-nodejs-test-dependencies-debian-bullseye
description: Test the installation of nodejs test dependencies on debian-bullseye
parent: zuul-jobs-test-nodejs-test-dependencies
tags: auto-generated
nodeset:
nodes:
- name: debian-bullseye
label: debian-bullseye
- job:
name: zuul-jobs-test-nodejs-test-dependencies-ubuntu-focal
description: Test the installation of nodejs test dependencies on ubuntu-focal
parent: zuul-jobs-test-nodejs-test-dependencies
tags: auto-generated
nodeset:
nodes:
- name: ubuntu-focal
label: ubuntu-focal
- job:
name: zuul-jobs-test-nodejs-test-dependencies-ubuntu-jammy
description: Test the installation of nodejs test dependencies on ubuntu-jammy
parent: zuul-jobs-test-nodejs-test-dependencies
tags: auto-generated
nodeset:
nodes:
- name: ubuntu-jammy
label: ubuntu-jammy
- job:
name: zuul-jobs-test-nodejs-test-dependencies-ubuntu-noble
description: Test the installation of nodejs test dependencies on ubuntu-noble
parent: zuul-jobs-test-nodejs-test-dependencies
tags: auto-generated
nodeset:
nodes:
- name: ubuntu-noble
label: ubuntu-noble
- job:
name: zuul-jobs-test-netlify-publish
description: Test the netlify-publish role
files:
- roles/netlify-publish/.*
pre-run: playbooks/javascript/pre.yaml
run: test-playbooks/simple-role-test.yaml
vars:
netlify_auth:
token: 61ae27a3127142049eaf8c4ec507f7f4
netlify_site_id: test-site
# We can't actually do a deploy in the role test
netlify_publish_skip_upload: true
role_name: netlify-publish
# We're testing the role, so job version overrides
# in the netlify job aren't relevant. Override here.
node_version: 20
# -* AUTOGENERATED *-
# The following project section is autogenerated by
# tox -e update-test-platforms
# Please re-run to generate new job lists
- project:
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
- zuul-jobs-test-nodejs-test-dependencies-debian-bookworm
- zuul-jobs-test-nodejs-test-dependencies-debian-bullseye
- zuul-jobs-test-nodejs-test-dependencies-ubuntu-focal
- zuul-jobs-test-nodejs-test-dependencies-ubuntu-jammy
- zuul-jobs-test-nodejs-test-dependencies-ubuntu-noble
- zuul-jobs-test-netlify-publish
gate:
jobs: *id001
periodic-weekly:
jobs: *id001