Switch from Batali to Berkshelf to manage upstream cookbooks

This commit is contained in:
Greg Karékinian
2018-04-17 12:15:43 +02:00
parent 0c80aaabd4
commit d3aa94aab5
62 changed files with 943 additions and 2560 deletions

View File

@@ -1,49 +0,0 @@
*.rbc
.config
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
_Store
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
*.tmp
*.bk
*.bkup
# ruby/bundler files
.ruby-version
.ruby-gemset
.rvmrc
Gemfile.lock
.bundle
*.gem
# YARD artifacts
.yardoc
_yardoc
doc/
.idea
# chef stuff
Berksfile.lock
.kitchen
.kitchen.local.yml
vendor/
.coverage/
.zero-knife.rb
Policyfile.lock.json
# vagrant stuff
.vagrant/
.vagrant.d/
.kitchen/

View File

@@ -1,105 +0,0 @@
driver:
name: vagrant
provisioner:
name: chef_zero
verifier:
name: inspec
driver_config:
customize:
memory: 512
cpus: 4
platforms:
- name: centos-5.11
- name: centos-6.8
- name: centos-7.2
- name: debian-7.11
run_list: apt::default
- name: debian-8.5
run_list: apt::default
- name: fedora-24
run_list: yum::dnf_yum_compat
- name: ubuntu-12.04
run_list: apt::default
- name: ubuntu-14.04
run_list: apt::default
- name: ubuntu-16.04
run_list: apt::default
suites:
- name: default
run_list:
- recipe[nodejs]
- name: package
run_list:
- recipe[nodejs]
attributes:
nodejs:
install_method: package
- name: binary
run_list:
- recipe[nodejs]
attributes:
nodejs:
install_method: binary
- name: source
run_list:
- recipe[nodejs]
attributes:
nodejs:
install_method: source
excludes:
- ubuntu-12.04
- centos-5.11
- centos-6.8
- name: source-iojs
run_list:
- recipe[nodejs]
attributes:
nodejs:
engine: iojs
install_method: source
source:
checksum: 55e79cc4f4cde41f03c1e204d2af5ee4b6e4edcf14defc82e518436e939195fa
version: 2.2.1
excludes:
- ubuntu-12.04
- centos-5.11
- centos-6.8
- name: npm
run_list:
- recipe[nodejs::npm]
- recipe[nodejs_test::npm]
- name: npm_embedded
run_list:
- recipe[nodejs::npm]
- recipe[nodejs_test::npm]
attributes:
nodejs:
npm:
install_method: embedded
- name: npm_source
run_list:
- recipe[nodejs::npm]
- recipe[nodejs_test::npm]
attributes:
nodejs:
npm:
install_method: source
excludes:
- ubuntu-12.04
- centos-5.11
- centos-6.8
- name: npm_packages
run_list: recipe[nodejs]
attributes:
nodejs:
npm_packages:
- name: express
- name: socket.io
version: 1.0.4
- name: express
action: uninstall

View File

@@ -1,25 +0,0 @@
# Use Travis's cointainer based infrastructure
sudo: false
addons:
apt:
sources:
- chef-current-precise
packages:
- chefdk
# Don't `bundle install`
install: echo "skip bundle install"
branches:
only:
- master
# Ensure we make ChefDK's Ruby the default
before_script:
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/bin/chef exec rake

View File

@@ -1,9 +0,0 @@
source 'https://supermarket.chef.io'
metadata
group :integration do
cookbook 'yum'
cookbook 'apt'
cookbook 'nodejs_test', path: './test/cookbooks/nodejs_test'
end

View File

@@ -1,134 +0,0 @@
# NodeJS Cookbook Changelog
## 3.0.0 (2016-11-02)
- Updated the default release to the nodejs 6.9.1\. This requires C++11 extensions to compile, which are only present in GCC 4.8+. Due to this RHEL 5/6 and Ubuntu 12.04 are not supported if using this version.
- Switched the download URLs to the .xz packages since the .tar.gz packages are no longer being created
- Improvements to the readme examples and requirements sections
- Removed installation of apt-transport-https and instead rely on an apt cookbook that will do the same
- Fixed the ChefSpec matchers
- Added Scientific, Oracle, and Amazon as supported distros in the metadata
- Added chef_version metadata
- Removed conflicts and suggests metadata which aren't implemented or recommended for use
- Removed Chef 10 compatibility code
- Switched Integration testing to Inspec from bats
- Added the Apache 2.0 license file to the repo
- Expanded Test Kitchen testing
- Switched from Rubocop to Cookstyle and resolved all warnings
- Switched Travis to testing using ChefDK
## 2.4.4
- Use HTTPS prefix URLs for node download #98
- Update NPM symlink when installing from source #105
- Add support for NPM private modules #107
## v2.4.2
- Fix check version
- Support iojs package install
## v2.4.0
- Move `npm_packages` to his own recipe
- Fix different race conditions when using direct recipe call
- Fix npm recipe
## v2.3.2
- Fix package recipe
## v2.3.0
- Support io.js. Use node['nodejs']['engine'].
- Add MacOS support via homebrew
## v2.2.0
- Add node['nodejs']['keyserver']
- Update arm checksum
- Fix `npm_packages` JSON
## v2.1.0
- Use official nodesource repository
- Add node['nodejs']['npm_packages'] to install npm package with `default` recipe
## v2.0.0
- Travis integration
- Gems updated
- Rewrite cookbook dependencies
- Added complete test-kitchen integration : Rake, rubocop, foodcritic, vagrant, bats testing ...
- Added NodeJS `install_method` option (sources, bins or packages)
- Added NPM `install_method` option (sources or packages)
- NPM version can now be chosen independently from nodejs' embedded version
- Added a `nodejs_npm` LWRP to manage, install and resolve NPM packages
## v1.3.0
- update default versions to the latest: node - v0.10.15 and npm - v1.3.5
- default to package installation of nodejs on smartos ([@wanelo-pair])
- Add Raspberry pi support ([@robertkowalski])
## v1.2.0
- implement installation from package on RedHat - ([@vaskas])
## v1.1.3:
- update default version of node to 0.10.13 - and npm - v1.3.4 ([@jodosha][])
## v1.1.2:
- update default version of node to 0.10.2 - ([@bakins])
- fully migrated to test-kitchen 1.alpha and vagrant 1.1.x/berkshelf 1.3.1
## v1.1.1:
- update default versions to the latest: node - v0.10.0 and npm - v1.2.14
- `make_thread` is now a real attribute - ([@ChrisLundquist])
## v1.1.0:
- rewrite the package install; remove rpm support since there are no longer any packages available anywhere
- add support to install `legacy_packages` from ubuntu repo as well as the latest 0.10.x branch (this is default).
## v1.0.4:
- add support for binary installation method ([@JulesAU])
## v1.0.3:
- unreleased
## v1.0.2:
- add smartos support for package install ([@sax])
- support to compile with all processors available (default 2 if unknown) - ([@ChrisLundquist])
- moved to `platform_family` syntax
- ensure npm recipe honours the 'source' or 'package' setting - ([@markbirbeck])
- updated the default versions to the latest stable node/npm
## v1.0.1:
- fixed bug that prevented overwritting the node/npm versions (moved the `src_url`s as local variables instead of attributes) - ([@johannesbecker])
- updated the default versions to the latest node/npm
## v1.0.0:
- added packages installation support ([@smith])
[@bakins]: https://github.com/bakins
[@chrislundquist]: https://github.com/ChrisLundquist
[@gmccue]: https://github.com/gmccue
[@johannesbecker]: https://github.com/johannesbecker
[@julesau]: https://github.com/JulesAU
[@markbirbeck]: https://github.com/markbirbeck
[@predominant]: https://github.com/predominant
[@robertkowalski]: https://github.com/robertkowalski
[@sax]: https://github.com/sax
[@sjlu]: https://github.com/sjlu
[@smith]: https://github.com/smith
[@vaskas]: https://github.com/vaskas
[@wanelo-pair]: https://github.com/wanelo-pair

View File

@@ -1,67 +0,0 @@
#!/usr/bin/env rake
# Style tests. cookstyle (rubocop) and Foodcritic
namespace :style do
begin
require 'cookstyle'
require 'rubocop/rake_task'
desc 'Run Ruby style checks'
RuboCop::RakeTask.new(:ruby)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
begin
require 'foodcritic'
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any'],
progress: true
}
end
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
desc 'Run all style checks'
task style: ['style:chef', 'style:ruby']
# ChefSpec
begin
require 'rspec/core/rake_task'
desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
# Integration tests. Kitchen.ci
namespace :integration do
begin
require 'kitchen/rake_tasks'
desc 'Run kitchen integration tests'
Kitchen::RakeTasks.new
rescue StandardError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
namespace :supermarket do
begin
require 'stove/rake_task'
desc 'Publish cookbook to Supermarket with Stove'
Stove::RakeTask.new
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
# Default
task default: %w(style spec)

View File

@@ -1,20 +0,0 @@
name 'nodejs'
maintainer 'redguide'
maintainer_email 'guilhem@lettron.fr'
license 'Apache 2.0'
description 'Installs/Configures node.js & io.js'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/redguide/nodejs' if respond_to?(:source_url)
issues_url 'https://github.com/redguide/nodejs/issues' if respond_to?(:issues_url)
chef_version '>= 11.0' if respond_to?(:chef_version)
version '3.0.0'
depends 'yum-epel'
depends 'build-essential'
depends 'ark'
depends 'apt', '>= 2.9.1'
depends 'homebrew'
%w(debian ubuntu centos redhat scientific oracle amazon smartos mac_os_x).each do |os|
supports os
end