deploy_rubygem 0.60.44 → 0.60.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3293c38588e7229b9f2074e0114709138d4fe9bb2b1a45eb4ac0291e9714d105
4
- data.tar.gz: 924e84c8f20fa1f9b6eb36ff7c03a19f7079e6f6ee2ac0cec363fa0574d592f5
3
+ metadata.gz: 3c6f5176a71cf96fafed51ea805cc1c5175adaec0d41a49a58c97e04dcce28ae
4
+ data.tar.gz: fd9bdb45005a555765b05533569fbc58d62faa2a0b707660319ee436cdbd0467
5
5
  SHA512:
6
- metadata.gz: 27ddeb97e43184716b2400c953b72c50c80efa5066e937702b7035ccc31eb27b9b10ecedd49398e491a6996e20bf53b85e93a78f133e626bd045c0bc47663253
7
- data.tar.gz: 8d8784c64e002254dd347aec7dcc4906b01490d8ec469751349c2ff977a7131f9ed12dd606788ceb8369de0c0d23cc0fe7def45593168daaeccc9f38b31e3019
6
+ metadata.gz: dd5d9669b7eb13eab69e8576bbd9b53130f64db7d3c27b57afc178795bb030ba2f6022a7ed353cd82bf71836b4b0eb0db91be25125fcfe60eb919d6758b86c11
7
+ data.tar.gz: f5e7c37f166c0d6d0e51d2dd9ad5529253ff8ef092cdfc7028f7a2ab783c1f2461a024afc11a60360687e9d56a077bbf766abd44cb39e66655fdf36fcd3b902a
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DeployRubygem module helper for rubygem
4
+ module DeployRubygem
5
+ # RakeTask to use with DeployRubygem projects
6
+ module ChefCookbookTask
7
+ def chef_client # :nodoc:
8
+ desc "@desc with #{__method__}"
9
+ task :chef_client do
10
+ system('sudo chef-client')
11
+ end
12
+ end
13
+
14
+ def install_policy # :nodoc:
15
+ desc "@desc with #{__method__}"
16
+ task install_policy: %i[build_cookbook] do
17
+ system('chef install Policyfile.rb')
18
+ end
19
+ end
20
+
21
+ def release_policy # :nodoc:
22
+ desc "@desc with #{__method__}"
23
+ task release_policy: %i[clean_cookbook install_policy] do
24
+ system('chef push prod Policyfile.lock.json')
25
+ end
26
+ end
27
+
28
+ def install_cookbook # :nodoc:
29
+ desc "@desc with #{__method__}"
30
+ task :install_cookbook do
31
+ system("sudo chef-client -o #{@task_name}")
32
+ end
33
+ end
34
+
35
+ def report # :nodoc:
36
+ desc "@desc with #{__method__}"
37
+ task :report do
38
+ system("sudo chef-client -o #{@task_name}::compile_report")
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DeployRubygem module helper for rubygem
4
+ module DeployRubygem
5
+ # RakeTask to use with DeployRubygem projects
6
+ module InspecCookbookTask
7
+ def compliance # :nodoc:
8
+ desc "@desc with #{__method__}"
9
+ task :compliance do
10
+ inspect_opts = [
11
+ '--input-file', File.join('compliance', 'inputs', "#{@task_name}.yml"),
12
+ '--waiver-file', File.join('compliance', 'waivers', "#{@task_name}.yml"),
13
+ '--reporter', "html:/tmp/html/#{@task_name}_rake_report.html"
14
+ ]
15
+ inspec_cmd = "inspec exec compliance/profiles/#{@task_name}-accept #{inspect_opts.join(' ')}"
16
+ puts "inspec_cmd = #{inspec_cmd}"
17
+ system(inspec_cmd)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # DeployRubygem module helper for rubygem
4
+ module DeployRubygem
5
+ # RakeTask to use with DeployRubygem projects
6
+ module KnifeCookbookTask
7
+ def cookstyle # :nodoc:
8
+ desc "@desc with #{__method__}"
9
+ task cookstyle: %i[rubocop] do
10
+ system('cookstyle')
11
+ end
12
+ end
13
+
14
+ def build_cookbook # :nodoc:
15
+ desc "@desc with #{__method__}"
16
+ task build_cookbook: %i[chef_client clean_cookbook cookstyle] do
17
+ system("knife cookbook upload #{@task_name}")
18
+ end
19
+ end
20
+ end
21
+ end
@@ -3,11 +3,18 @@
3
3
  require 'rake/dsl_definition'
4
4
 
5
5
  require_relative 'default'
6
+ require_relative 'cookbook/chef'
7
+ require_relative 'cookbook/inspec'
8
+ require_relative 'cookbook/knife'
6
9
 
7
10
  # DeployRubygem module helper for rubygem
8
11
  module DeployRubygem
9
12
  # RakeTask to use with DeployRubygem projects
10
13
  class RakeCookbookTask < RakeDefaultTask
14
+ include ChefCookbookTask
15
+ include InspecCookbookTask
16
+ include KnifeCookbookTask
17
+
11
18
  def initialize(task_name = 'cookbook', desc = 'Run DeployRubygem task')
12
19
  super
13
20
  end
@@ -55,62 +62,6 @@ module DeployRubygem
55
62
  task release_cookbook: %i[clean_cookbook release_policy release]
56
63
  end
57
64
 
58
- def cookstyle # :nodoc:
59
- desc "@desc with #{__method__}"
60
- task cookstyle: %i[rubocop] do
61
- system('cookstyle')
62
- end
63
- end
64
-
65
- def build_cookbook # :nodoc:
66
- desc "@desc with #{__method__}"
67
- task build_cookbook: %i[clean_cookbook cookstyle] do
68
- system('knife cookbook upload jimbo_management_site')
69
- end
70
- end
71
-
72
- def install_policy # :nodoc:
73
- desc "@desc with #{__method__}"
74
- task install_policy: %i[build_cookbook] do
75
- system('chef install Policyfile.rb')
76
- end
77
- end
78
-
79
- def release_policy # :nodoc:
80
- desc "@desc with #{__method__}"
81
- task release_policy: %i[clean_cookbook install_policy] do
82
- system('chef push prod Policyfile.lock.json')
83
- end
84
- end
85
-
86
- def install_cookbook # :nodoc:
87
- desc "@desc with #{__method__}"
88
- task :install_cookbook do
89
- system("sudo chef-client -o #{@task_name}")
90
- end
91
- end
92
-
93
- def compliance # :nodoc:
94
- desc "@desc with #{__method__}"
95
- task :compliance do
96
- inspect_opts = [
97
- '--input-file', File.join('compliance', 'inputs', "#{@task_name}.yml"),
98
- '--waiver-file', File.join('compliance', 'waivers', "#{@task_name}.yml"),
99
- '--reporter', "html:/tmp/html/#{@task_name}_rake_report.html"
100
- ]
101
- inspec_cmd = "inspec exec compliance/profiles/#{@task_name}-accept #{inspect_opts.join(' ')}"
102
- puts "inspec_cmd = #{inspec_cmd}"
103
- system(inspec_cmd)
104
- end
105
- end
106
-
107
- def report # :nodoc:
108
- desc "@desc with #{__method__}"
109
- task :report do
110
- system("sudo chef-client -o #{@task_name}::compile_report")
111
- end
112
- end
113
-
114
65
  def clean_cookbook # :nodoc:
115
66
  desc "@desc with #{__method__}"
116
67
  task clean_cookbook: %i[clean] do
@@ -3,5 +3,5 @@
3
3
  # Set version for DeployRubygem
4
4
  module DeployRubygem
5
5
  # VERSION = new_deploy_rubygem.gvb_version.short_version
6
- VERSION = '0.60.44'
6
+ VERSION = '0.60.45'
7
7
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_rubygem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.60.44
4
+ version: 0.60.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -135,6 +135,9 @@ files:
135
135
  - lib/deploy_rubygem/project.rb
136
136
  - lib/deploy_rubygem/rake.rb
137
137
  - lib/deploy_rubygem/rake/cookbook.rb
138
+ - lib/deploy_rubygem/rake/cookbook/chef.rb
139
+ - lib/deploy_rubygem/rake/cookbook/inspec.rb
140
+ - lib/deploy_rubygem/rake/cookbook/knife.rb
138
141
  - lib/deploy_rubygem/rake/default.rb
139
142
  - lib/deploy_rubygem/rspec.rb
140
143
  - lib/deploy_rubygem/rspec/chef.rb
metadata.gz.sig CHANGED
Binary file