afaundez / nodenv-cookbook Goto Github PK
View Code? Open in Web Editor NEWNodenv Chef Cookbook.
Home Page: https://supermarket.chef.io/cookbooks/nodenv
License: MIT License
Nodenv Chef Cookbook.
Home Page: https://supermarket.chef.io/cookbooks/nodenv
License: MIT License
Running kitchen test default-fedora-26
:
...
System Package
∅ git should be installed
expected that `System Package git` is installed
File /etc/profile.d/nodenv.sh
✔ should exist
Bash command
✔ sudo -H -u vagrant bash -c "source /etc/profile.d/nodenv.sh && nodenv global" exit_status should eq 0
✔ sudo -H -u vagrant bash -c "source /etc/profile.d/nodenv.sh && nodenv global" stdout should include "8.2.1"
✔ sudo -H -u vagrant bash -c "source /etc/profile.d/nodenv.sh && nodenv global" stdout should not match /system/
Test Summary: 4 successful, 1 failure, 0 skipped
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Verify failed on instance <default-fedora-26>. Please see .kitchen/logs/default-fedora-26.log for more details
But git
is already installed.
This causes failures in environments where deprecations_as_errors is set to true
https://github.com/afaundez/nodenv-cookbook/blob/1.0.3/resources/user.rb#L30
PR incoming
Seems like git checkout in nodenv_user
resource does not update git codebase after first run.
For eg, when HEAD or master is specified, it only checks out the very first time and thereafter never updates it. This can cause issues when you'd like to specify a newer node version than what is known by the nodenv version that was checked out at first run.
For tags, this should be good as it isn't a moving target like a branch or HEAD (remote).
Maybe it should use sync instead of checkout?
What are your thoughts?
Running kitchen test default-debian-7
...
Unpacking chef (from .../cache/chef_13.7.16-1_amd64.deb) ...
Setting up chef (13.7.16-1) ...
Thank you for installing Chef!
Transferring files to <default-debian-7>
/opt/chef/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /opt/chef/embedded/lib/libruby.so.2.4)
/opt/chef/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by /opt/chef/embedded/lib/libruby.so.2.4)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <default-debian-7>. Please see .kitchen/logs/default-debian-7.log for more details
...
Running kitchen test default-ubuntu-1704
:
...
Err:8 http://archive.ubuntu.com/ubuntu zesty-backports Release
404 Not Found [IP: 91.189.88.152 80]
Reading package lists...
STDERR: E: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does no longer have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu zesty Release' does no longer have a Release file.
...
---- End output of apt-get -q update ----
Ran apt-get -q update returned 100
[2018-02-01T08:10:51+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <default-ubuntu-1704>. Please see .kitchen/logs/default-ubuntu-1704.log for more details
Even if the user has not install nodenv the profile.d script assumes it's installed and runs.
Nab more code from ruby_rbenv here
Based on #18
https://github.com/afaundez/nodenv-cookbook/blob/master/resources/user.rb#L30-L33
node_build_plugin_install uses the correct property name but its value is new_resource.user
which is a deprecated property in nodenv_user
resource
PR incoming and re-enabling deprecations_as_errors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.