Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default version to current LTS #282

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require:
- cookstyle
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Update default version to current LTS

## 10.1.21 - *2024-11-19*

- Update CI platforms
Expand Down
4 changes: 2 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
'source'
end

default['nodejs']['version'] = '17.9.0'
default['nodejs']['version'] = '22.11.0'

default['nodejs']['prefix_url']['node'] = 'https://nodejs.org/dist/'

default['nodejs']['tmpdir'] = '/tmp'
default['nodejs']['source']['url'] = nil # Auto generated
default['nodejs']['source']['checksum'] = '25d8c6559456d548823e3f7f4fae7dc8c7d5a0f7772c79c8d902528e801ba09a'
default['nodejs']['source']['checksum'] = '24e5130fa7bc1eaab218a0c9cb05e03168fa381bb9e3babddc6a11f655799222'

default['nodejs']['binary']['url'] = nil # Auto generated
default['nodejs']['binary']['checksum']['linux_x64'] = '8c9f4c95c254336fcb2c768e746f4316b8176adc0fb599cbbb460d0933991d12'
Expand Down
6 changes: 3 additions & 3 deletions attributes/repo.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
case node['platform_family']
when 'debian'
default['nodejs']['install_repo'] = true
default['nodejs']['repo'] = 'https://deb.nodesource.com/node_17.x'
default['nodejs']['repo'] = 'https://deb.nodesource.com/node_20.x'
default['nodejs']['keyserver'] = 'keyserver.ubuntu.com'
default['nodejs']['key'] = '1655a0ab68576280'
when 'rhel', 'amazon'
default['nodejs']['install_repo'] = true
release_ver = platform?('amazon') ? 7 : node['platform_version'].to_i
default['nodejs']['repo'] = "https://rpm.nodesource.com/pub_17.x/el/#{release_ver}/$basearch"
default['nodejs']['repo'] = "https://rpm.nodesource.com/pub_20.x/el/#{release_ver}/$basearch"
default['nodejs']['key'] = 'https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL'
when 'fedora'
default['nodejs']['install_repo'] = true
default['nodejs']['repo'] = 'https://rpm.nodesource.com/pub_17.x/el/9/$basearch'
default['nodejs']['repo'] = 'https://rpm.nodesource.com/pub_20.x/el/9/$basearch'
default['nodejs']['key'] = 'https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL'
end
43 changes: 0 additions & 43 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,8 @@
driver:
name: vagrant

provisioner:
name: chef_zero
deprecations_as_errors: true
chef_license: accept-no-persist

verifier:
name: inspec

platforms:
- name: almalinux-8
- name: amazonlinux-2
- name: centos-7
- name: centos-stream-8
- name: debian-10
- name: debian-11
- name: opensuse-leap-15
- name: rockylinux-8
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: windows-2016
driver:
gui: false
box: tas50/windows_2016
customize:
memory: 2048

suites:
- name: default
excludes:
- windows-2016
run_list:
- recipe[nodejs::default]
attributes:
Expand All @@ -46,36 +18,26 @@ suites:
- name: express
action: :uninstall
- name: npm_embedded
excludes:
- windows-2016
run_list:
- recipe[nodejs::npm]
attributes:
nodejs:
npm:
install_method: embedded
- name: npm_source
excludes:
- windows-2016
run_list:
- recipe[nodejs::npm]
attributes:
nodejs:
npm:
install_method: source
- name: package
excludes:
- windows-2016
run_list:
- recipe[test::default]
- name: source
excludes:
- windows-2016
run_list:
- recipe[test::source]
- name: options
includes:
- ubuntu-20.04
run_list:
- recipe[nodejs]
attributes:
Expand All @@ -88,8 +50,3 @@ suites:
acpid: "--force-yes"
package_action:
adcli: :nothing
- name: chocolatey
includes:
- windows-2016
run_list:
- recipe[test::chocolatey]
17 changes: 14 additions & 3 deletions recipes/nodejs_from_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,24 @@

build_essential 'install build tools'

case node['platform_family']
case node['platform']
when 'rhel', 'fedora', 'amazon'
# The ark resource uses and requires python2 for builds
package %w(openssl-devel python3 tar)
# debian-12 & ubuntu 2204 need python 3
when 'debian'
package %w(libssl-dev python)
when 'suse'
if node['platform_version'].to_i >= 12
package %w(libssl-dev python3)
else
package %w(libssl-dev python)
end
when 'ubuntu'
if node['platform_version'].to_f >= 22.04
package %w(libssl-dev python3)
else
package %w(libssl-dev python)
end
else
package %w(python)
end

Expand Down
Loading