Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 4f4ea45e authored by Jean-François HOVINNE's avatar Jean-François HOVINNE
Browse files

feat: Set Node.js 22.x as default (fixes #40)

parent d0d0fe9c
Branches
Tags 3.0.0
1 merge request!47feat: Set Node.js 22.x as default (fixes #40)
...@@ -14,7 +14,7 @@ Role Variables ...@@ -14,7 +14,7 @@ Role Variables
- `nodejs_version`: Sets the Node.js version to install ("18.x", "20.x", etc), - `nodejs_version`: Sets the Node.js version to install ("18.x", "20.x", etc),
using the distribution package manager. using the distribution package manager.
The default version is 20.x. The default version is 22.x.
Optionally, in order to install a specific version from a downloadable archive, set the below variables: Optionally, in order to install a specific version from a downloadable archive, set the below variables:
...@@ -22,6 +22,8 @@ Optionally, in order to install a specific version from a downloadable archive, ...@@ -22,6 +22,8 @@ Optionally, in order to install a specific version from a downloadable archive,
- `nodejs_checksum`: The archive checksum - `nodejs_checksum`: The archive checksum
- `nodejs_install_path`: The path where Node.js will be installed - `nodejs_install_path`: The path where Node.js will be installed
Those variables must be manually set for RHEL 8 and Node.js > 20.x.
About Node.js 18.x, 20.x, 22.x and 23.x on Amazon Linux 2 About Node.js 18.x, 20.x, 22.x and 23.x on Amazon Linux 2
--------------------------------------------------------- ---------------------------------------------------------
...@@ -69,9 +71,9 @@ To globally install the default Node.js version: ...@@ -69,9 +71,9 @@ To globally install the default Node.js version:
bash <(curl -s https://code.europa.eu/-/snippets/1/raw/main/ansible-role.sh) ecgalaxy.nodejs bash <(curl -s https://code.europa.eu/-/snippets/1/raw/main/ansible-role.sh) ecgalaxy.nodejs
To globally install Node.js 22.x: To globally install Node.js 23.x:
bash <(curl -s https://code.europa.eu/-/snippets/1/raw/main/ansible-role.sh) ecgalaxy.nodejs --extra-vars '{"nodejs_version":"22.x"}' bash <(curl -s https://code.europa.eu/-/snippets/1/raw/main/ansible-role.sh) ecgalaxy.nodejs --extra-vars '{"nodejs_version":"23.x"}'
See [ansible-role](https://code.europa.eu/-/snippets/1) for instructions. See [ansible-role](https://code.europa.eu/-/snippets/1) for instructions.
......
# Releases # Releases
## 3.0.x
- Node.js 22.x set as default version.
## 2.6.x ## 2.6.x
- RHEL 9 and Ubuntu 24.04 support added. - RHEL 9 and Ubuntu 24.04 support added.
......
--- ---
# Set the version of Node.js to install ("12.x", "13.x", "14.x", "15.x", etc.). # Set the version of Node.js to install ("12.x", "13.x", "14.x", "15.x", etc.).
nodejs_version: "20.x" nodejs_version: "22.x"
# Instead of using the distribution package manager, download a specific # Instead of using the distribution package manager, download a specific
# Node.js archive and install it globally. # Node.js archive and install it globally.
......
...@@ -11,13 +11,6 @@ platforms: ...@@ -11,13 +11,6 @@ platforms:
http_proxy: "${http_proxy}" http_proxy: "${http_proxy}"
https_proxy: "${https_proxy}" https_proxy: "${https_proxy}"
no_proxy: "${no_proxy}" no_proxy: "${no_proxy}"
- name: rockylinux8-${CI_JOB_ID:-0}
image: code.europa.eu:4567/ecgalaxy/rockylinux8-ansible:latest
pre_build_image: true
environment:
http_proxy: "${http_proxy}"
https_proxy: "${https_proxy}"
no_proxy: "${no_proxy}"
- name: rockylinux9-${CI_JOB_ID:-0} - name: rockylinux9-${CI_JOB_ID:-0}
image: code.europa.eu:4567/ecgalaxy/rockylinux9-ansible:latest image: code.europa.eu:4567/ecgalaxy/rockylinux9-ansible:latest
pre_build_image: true pre_build_image: true
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
ansible.builtin.include_role: ansible.builtin.include_role:
name: nodejs name: nodejs
vars: vars:
nodejs_download_url: "https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz" nodejs_download_url: "https://nodejs.org/dist/v22.13.0/node-v22.13.0-linux-x64.tar.xz"
nodejs_checksum: "sha256:d8dab549b09672b03356aa2257699f3de3b58c96e74eb26a8b495fbdc9cf6fbe" nodejs_checksum: "sha256:3ff0d57063c33313d73d0bdcebc4c778ad6be948234584694a042c6fe57164f6"
nodejs_install_path: "/opt/nodejs/20.11.1" nodejs_install_path: "/opt/nodejs/22.13.0"
environment: environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}" http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}" https_proxy: "{{ lookup('env', 'https_proxy') }}"
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
- name: Setup (RedHat) - name: Setup (RedHat)
ansible.builtin.include_tasks: setup-RedHat.yml ansible.builtin.include_tasks: setup-RedHat.yml
when: nodejs_download_url == '' and ansible_os_family == 'RedHat' and ansible_distribution != 'Amazon' and nodejs_version_major | int > 16 when: nodejs_download_url == '' and ansible_os_family == 'RedHat' and ansible_distribution != 'Amazon'
and ((ansible_distribution_major_version | int == 8 and nodejs_version_major | int <= 20) or (ansible_distribution_major_version | int > 8))
- name: Setup (Amazon Linux 2) - name: Setup (Amazon Linux 2)
ansible.builtin.include_tasks: setup-Amazon.yml ansible.builtin.include_tasks: setup-Amazon.yml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment