kitchen-chef_zero_berks_env 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +5 -0
- data/README.md +45 -2
- data/lib/kitchen/provisioner/sandbox_berks_env.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzUyZjE3MzQ5ZDYwZGE4YzZhNDIxODJkNDgzZGEzMjcyNGRlOTIzNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTliMjdiZDc2Yzk4NjRkN2NjMWVhMTZkNWJlZGU1YmI4MDI2MTQ0Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWIxMzMzMmUyNGJjZjUzNWI0ZmE0Nzc5ZjYwNWZkOGU1NDg0ZThhOGViYzk5
|
10
|
+
ODNhZDIyYmU2NTEyODBmNzM5NjdkOWU2OWIzODQ0YWM4M2UyMjdjZWNhNmFm
|
11
|
+
Y2JhNDRlZTU0YThmMjNlOTQyNDBiOGYxNjFjMWI1Y2MzZDljZDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTQxMmE4NWNkNmQ2NjdlY2RkODZiNzRjNDRkODRjMTY0ZTVkMGNmNmYxZTI4
|
14
|
+
Nzc5MGQ5MmI0ZWFjM2IxYmU2NmM2NjE2NTEzMjAzMDNhZGMxMGU2Y2Y3NTZl
|
15
|
+
YWE2ZDE1ZTE2MTRkNmZjMjMyNjY5MGU3MGYzZjY4YmFkMjdhODg=
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/kitchen-chef_zero_berks_env.svg)](http://badge.fury.io/rb/kitchen-chef_zero_berks_env)
|
4
4
|
[![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/kitchen-chef_zero_berks_env?type=total&color=brightgreen)](https://rubygems.org/gems/kitchen-chef_zero_berks_env)
|
5
|
-
[![Build Status](https://travis-ci.org/ruizink/kitchen-chef_zero_berks_env.
|
5
|
+
[![Build Status](https://travis-ci.org/ruizink/kitchen-chef_zero_berks_env.svg?branch=master)](https://travis-ci.org/ruizink/kitchen-chef_zero_berks_env)
|
6
6
|
|
7
7
|
Chef Zero provider for Test Kitchen that enables Berkshelf to vendor the cookbook versions specified by a given chef environment.
|
8
8
|
|
@@ -11,10 +11,25 @@ Chef Zero provider for Test Kitchen that enables Berkshelf to vendor the cookboo
|
|
11
11
|
If you adopted the pattern of pinning cookbooks per chef environment, and still want to use Berkshelf and Test Kitchen on your workflow,
|
12
12
|
this provider extension enables Berkshelf to build a lock file based on a given chef environment, respecting the cookbook version dependencies.
|
13
13
|
The default behaviour of the Chef providers is to first gather the cookbook dependencies using Berkshelf vendor and then run Chef on the box.
|
14
|
-
Well, if you don't pin the cookbook version dependencies within the cookbooks, Berkshelf will end up vendoring
|
14
|
+
Well, if you don't pin the cookbook version dependencies within the cookbooks, Berkshelf will end up vendoring always the latest versions.
|
15
15
|
That might conflict with cookbook restrictions that you have defined within the chef environment, and the converge will fail.
|
16
16
|
Hopefuly this provider will do the trick!
|
17
17
|
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
In order to install this provider, run the following alternative commands:
|
21
|
+
|
22
|
+
1. If you use the test-kitchen bundled with ChefDK (I strongly recommend you to do it):
|
23
|
+
```
|
24
|
+
chef gem install kitchen-chef_zero_berks_env
|
25
|
+
```
|
26
|
+
Click [here](https://downloads.chef.io/chef-dk/) to know more about ChefDK
|
27
|
+
|
28
|
+
2. Otherwise simply run:
|
29
|
+
```
|
30
|
+
gem install kitchen-chef_zero_berks_env
|
31
|
+
```
|
32
|
+
|
18
33
|
## Usage
|
19
34
|
|
20
35
|
Simply replace the provider from `chef_zero` to `chef_zero_berks_env`.
|
@@ -49,3 +64,31 @@ suites:
|
|
49
64
|
client_rb:
|
50
65
|
environment: 'my_chef_environment'
|
51
66
|
```
|
67
|
+
|
68
|
+
## License & Authors
|
69
|
+
|
70
|
+
- Author:: Mário Santos (<mario.rf.santos@gmail.com>)
|
71
|
+
|
72
|
+
```text
|
73
|
+
The MIT License (MIT)
|
74
|
+
|
75
|
+
Copyright (c) 2015 Mário Santos
|
76
|
+
|
77
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
78
|
+
of this software and associated documentation files (the "Software"), to deal
|
79
|
+
in the Software without restriction, including without limitation the rights
|
80
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
81
|
+
copies of the Software, and to permit persons to whom the Software is
|
82
|
+
furnished to do so, subject to the following conditions:
|
83
|
+
|
84
|
+
The above copyright notice and this permission notice shall be included in all
|
85
|
+
copies or substantial portions of the Software.
|
86
|
+
|
87
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
88
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
89
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
90
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
91
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
92
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
93
|
+
SOFTWARE.
|
94
|
+
```
|
@@ -52,7 +52,7 @@ module Kitchen
|
|
52
52
|
def environments_path_from_git(repo)
|
53
53
|
info("Fetching chef environments from repo '#{repo}'...")
|
54
54
|
tmpenv_dir = Dir.mktmpdir('environments-')
|
55
|
-
Git.clone(repo, 'chef_env', path
|
55
|
+
Git.clone(repo, 'chef_env', :path => tmpenv_dir, :depth => 1)
|
56
56
|
"#{tmpenv_dir}/chef_env"
|
57
57
|
end
|
58
58
|
|
@@ -63,7 +63,7 @@ module Kitchen
|
|
63
63
|
# @api private
|
64
64
|
def cookbook_versions(json_path)
|
65
65
|
info("Using environment from '#{json_path}'")
|
66
|
-
JSON.parse(File.read(
|
66
|
+
JSON.parse(File.read(json_path.to_s))['cookbook_versions']
|
67
67
|
end
|
68
68
|
|
69
69
|
# Locks the cookbook versions into Berksfile.lock
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-chef_zero_berks_env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mário Santos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '3.2'
|
69
69
|
description: ! " Plugin for test-kitchen that extends the chef_zero provisioner allowing\n
|
70
70
|
\ berkshelf to use cookbook restrictions loaded from chef environment files.\n This
|
71
|
-
way, Berkshelf will
|
71
|
+
way, Berkshelf will always vendor the cookbook versions specified\n in the chef
|
72
72
|
environment.\n"
|
73
73
|
email:
|
74
74
|
- mario.rf.santos@gmail.com
|