Skip to content

Commit

Permalink
[Apt] Nodejs 22 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Jul 3, 2024
1 parent fab83be commit 880bb2c
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/molecule.nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
with:
debug: ${{ inputs.debug == true }}
scenario: nodejs
versions: '[4, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20]'
versions: '[4, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22]'
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- [Apt] Nodejs 22 support

## [4.0.0] - 2024-04-12
### Changed
Expand Down
20 changes: 20 additions & 0 deletions molecule/nodejs.22/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---

###########
# Default #
###########

- name: Default
tags: [default]
hosts: debian
tasks:
- block: # noqa: name[missing]
- name: Role
ansible.builtin.import_role:
name: manala.roles.nodejs
always:
- name: Goss
ansible.builtin.command:
cmd: goss --gossfile - validate
stdin: "{{ lookup('ansible.builtin.template', 'goss/default.yaml.j2') }}"
changed_when: false
15 changes: 15 additions & 0 deletions molecule/nodejs.22/goss/default.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

package:
nodejs:
installed: true

command:
node --version:
exit-status: 0
stdout:
- "/^v22.\\d+\\.\\d+$/"
npm --version:
exit-status: 0
stdout:
- "/^10.\\d+\\.\\d+$/"
Empty file added molecule/nodejs.22/molecule.yml
Empty file.
12 changes: 12 additions & 0 deletions molecule/nodejs.22/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

- name: Prepare
tags: [always]
hosts: debian
tasks:
- name: Apt
ansible.builtin.import_role:
name: manala.roles.apt
vars:
manala_apt_preferences:
- nodejs@nodesource_22
1 change: 1 addition & 0 deletions roles/apt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ manala_apt_repositories:
- nodesource_16
- nodesource_18
- nodesource_20
- nodesource_22
- postgresql
- mongodb_4_2
- mongodb_4_4
Expand Down
31 changes: 19 additions & 12 deletions roles/apt/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,68 +81,73 @@ manala_apt_repositories_patterns:
uris: https://deb.nodesource.com/node_4.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_4_x.list
nodesource_6:
uris: https://deb.nodesource.com/node_6.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_6_x.list
nodesource_7:
uris: https://deb.nodesource.com/node_7.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_7_x.list
nodesource_8:
uris: https://deb.nodesource.com/node_8.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_8_x.list
nodesource_9:
uris: https://deb.nodesource.com/node_9.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_9_x.list
nodesource_10:
uris: https://deb.nodesource.com/node_10.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_10_x.list
nodesource_12:
uris: https://deb.nodesource.com/node_12.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_12_x.list
nodesource_14:
uris: https://deb.nodesource.com/node_14.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_14_x.list
nodesource_16:
uris: https://deb.nodesource.com/node_16.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_16_x.list
nodesource_18:
uris: https://deb.nodesource.com/node_18.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_18_x.list
nodesource_20:
uris: https://deb.nodesource.com/node_20.x
suites: "{{ ansible_facts.distribution_release }}"
components: main
key: nodesource
key: nodesource_legacy
legacy_file: deb_nodesource_com_node_20_x.list
nodesource_22:
uris: https://deb.nodesource.com/node_22.x
suites: nodistro
components: main
key: nodesource
mysql_5_7:
uris: http://repo.mysql.com/apt/{{ ansible_facts.distribution | lower }}/
suites: "{{ ansible_facts.distribution_release }}"
Expand Down Expand Up @@ -564,8 +569,10 @@ manala_apt_keys_patterns:
signed_by: https://nginx.org/keys/nginx_signing.key
bearstech:
signed_by: http://deb.bearstech.com/bearstech-archive.gpg
nodesource:
nodesource_legacy:
signed_by: http://deb.nodesource.com/gpgkey/nodesource.gpg.key
nodesource:
signed_by: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
mysql:
signed_by: https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
mariadb:
Expand Down

0 comments on commit 880bb2c

Please sign in to comment.