knife-flow 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +7 -5
- data/lib/chef/knife/release.rb +4 -6
- data/lib/knife-flow/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -16,9 +16,11 @@ Installing knife-flow
|
|
16
16
|
-------------------
|
17
17
|
Be sure you are running the latest version Chef.
|
18
18
|
|
19
|
-
|
19
|
+
gem install knife-flow
|
20
|
+
|
21
|
+
If you are a production level administrator: map the "development" org to the knife.rb file, and the "production" org to a knife-production.rb file.
|
22
|
+
All other developers just need the regurlar "development" org to the knife.rb file mapping.
|
20
23
|
|
21
|
-
Copy the increment.rb, promote.rb and release.rb files to the <tt>chef-repo/.chef/knife/plugins</tt> directory.
|
22
24
|
|
23
25
|
Plugins
|
24
26
|
---------------
|
@@ -29,7 +31,7 @@ Uploads the cookbook by running <tt> knife cookbook upload COOKBOOK COOKBOOK </t
|
|
29
31
|
Commits the changes to the "develop" branch <br />
|
30
32
|
|
31
33
|
|
32
|
-
|
34
|
+
knife increment COOKBOOK COOKBOOK ...
|
33
35
|
|
34
36
|
|
35
37
|
This plugin is useful when working on the projects in the "sandbox" stage. The "_default" environment will always load the latest versions of the cookbooks.
|
@@ -43,7 +45,7 @@ Uploads the ENVIRONMENT.json file to the "development" org. <br />
|
|
43
45
|
Commits the changes to the "develop" branch. <br />
|
44
46
|
|
45
47
|
|
46
|
-
|
48
|
+
knife promote ENVIRONMENT(i.e. candidate) COOKBOOK COOKBOOK ...
|
47
49
|
|
48
50
|
|
49
51
|
This plugin is useful when working on the projects in the "validation" and "performance" stage. The "candidate" environment will be used to validate the cookbooks versions.
|
@@ -54,7 +56,7 @@ Copies the "candidate" environment cookbook list and transfer them to the ENVIRO
|
|
54
56
|
Commits all changes and creates a release tag TAG using the <tt> git flow release start/finish TAG </tt>. <br />
|
55
57
|
Uploads all cookbooks to the "production" org. <br />
|
56
58
|
|
57
|
-
|
59
|
+
knife release ENVIRONMENT(i.e. innovate or production) TAG(i.e. 2011.2.3)
|
58
60
|
|
59
61
|
This plugin is useful when we are ready to migrate the cookbooks to the environments in the "production" org.
|
60
62
|
|
data/lib/chef/knife/release.rb
CHANGED
@@ -103,12 +103,10 @@ module KnifeFlow
|
|
103
103
|
# TODO - someone smarter than me can switch the organization without requiring 2 different knife.rb files
|
104
104
|
current_dir = File.dirname(__FILE__)
|
105
105
|
case env_name
|
106
|
-
when "innovate"
|
107
|
-
Chef::Config[:config_file] = "
|
108
|
-
when "production"
|
109
|
-
Chef::Config[:config_file] = "#{current_dir}/../../knife-production.rb"
|
106
|
+
when "innovate", "production"
|
107
|
+
Chef::Config[:config_file] = File.join File.expand_path('.'), "knife-production.rb"
|
110
108
|
when "candidate"
|
111
|
-
Chef::Config[:config_file] = "
|
109
|
+
Chef::Config[:config_file] = File.join File.expand_path('.'), "knife.rb"
|
112
110
|
end
|
113
111
|
::File::open(config[:config_file]) { |f| apply_config(f.path) }
|
114
112
|
end
|
@@ -165,7 +163,7 @@ module KnifeFlow
|
|
165
163
|
|
166
164
|
def parse_name_args!
|
167
165
|
if name_args.empty?
|
168
|
-
ui.error("USAGE: knife
|
166
|
+
ui.error("USAGE: knife release ENVIRONMENT TAG")
|
169
167
|
exit 1
|
170
168
|
else
|
171
169
|
return name_args
|
data/lib/knife-flow/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Johnlouis Petitbon
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-07-
|
20
|
+
date: 2011-07-14 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies: []
|
23
23
|
|