zuul-jobs/roles/ensure-nodejs
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
..
files Rename install-nodejs to ensure-nodejs for consistency 2020-04-04 15:41:29 -04:00
tasks Modernize ensure-nodejs 2024-09-18 16:46:00 -07:00
templates Rename install-nodejs to ensure-nodejs for consistency 2020-04-04 15:41:29 -04:00
README.rst Rename install-nodejs to ensure-nodejs for consistency 2020-04-04 15:41:29 -04:00

Install NodeJS from nodesource

Role Variables