deploy_rubygem 0.60.26 → 0.60.28
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Rakefile +1 -1
- data/lib/deploy_rubygem/cookbook.rb +9 -1
- data/lib/deploy_rubygem/inspectestor.rb +10 -2
- data/lib/deploy_rubygem/version.rb +1 -11
- data/lib/deploy_rubygem.rb +32 -22
- data.tar.gz.sig +0 -0
- metadata +2 -3
- metadata.gz.sig +0 -0
- data/lib/deploy_rubygem/deploy_rubygem_options.rb +0 -106
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 560eeb1bcd98d335fcd4c1cb339b52b3ebbefb3c7d7cdd6b70341497be4219f5
|
4
|
+
data.tar.gz: 12d5f2ebe6b2f88a231f662533192acc9f3958acc7216586fde1698bb1faa536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31f2ce57e486a66962902b40bcd91d3f2a0f87fcad5024c460b11a567404abf2bf6289be4721f29c3dc9149fb7f4fd421e43cc71e3e46595ae6ce93b3739a6a9
|
7
|
+
data.tar.gz: 3241ce37ec96c62d34fcb019bfa3ec19023b87081798e44207a4ad9fcaf68bf2ca17a2c134de13992d6fc1e16a3cf308de339254407c2299874bc22a508d9d5a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -17,7 +17,7 @@ task test_version: %i[install compliance]
|
|
17
17
|
task :compliance do
|
18
18
|
system('inspec exec compliance')
|
19
19
|
end
|
20
|
-
task developper: %i[rubocop push default
|
20
|
+
task developper: %i[rubocop push default]
|
21
21
|
task :push do
|
22
22
|
system('git add .')
|
23
23
|
system("git commit -m 'Rake pusing version #{DeployRubygem::VERSION}'")
|
@@ -17,7 +17,7 @@ module DeployRubygem
|
|
17
17
|
@profiles = cookbook_info[:compliance_profiles].map do |profile_name|
|
18
18
|
input_file = File.join(%w[compliance inputs] + ["#{cookbook_name}.yml"])
|
19
19
|
waiver_file = File.join(%w[compliance waivers] + ["#{cookbook_name}.yml"])
|
20
|
-
InspecTestor.new(profile_name, input_file, waiver_file)
|
20
|
+
InspecTestor.new(File.join(%w[compliance profiles], profile_name.to_s), input_file, waiver_file)
|
21
21
|
end
|
22
22
|
@kitchens = cookbook_info[:kitchens].map do |kitchen_name|
|
23
23
|
Kitchen.new(kitchen_name, self)
|
@@ -27,6 +27,14 @@ module DeployRubygem
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
def generate
|
31
|
+
return if Dir.exist?(cookbook_path)
|
32
|
+
|
33
|
+
Dir.chdir(File.dirname(cookbook_path)) do
|
34
|
+
system("chef generate cookbook #{cookbook_name}")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
30
38
|
def cookbook_name
|
31
39
|
project_name
|
32
40
|
end
|
@@ -46,12 +46,20 @@ module DeployRubygem
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def clean
|
49
|
-
FileUtils.rm_rf(
|
50
|
-
File.delete(File.
|
49
|
+
FileUtils.rm_rf(vendor_folder) if Dir.exist?(vendor_folder)
|
50
|
+
File.delete(lock_file) if File.exist?(lock_file)
|
51
51
|
end
|
52
52
|
|
53
53
|
private
|
54
54
|
|
55
|
+
def vendor_folder
|
56
|
+
File.join(inspec_path, 'vendor')
|
57
|
+
end
|
58
|
+
|
59
|
+
def lock_file
|
60
|
+
File.join(inspec_path, 'inspec.lock')
|
61
|
+
end
|
62
|
+
|
55
63
|
def chef_license
|
56
64
|
'--chef-license accept'
|
57
65
|
end
|
@@ -1,19 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'rubygem'
|
4
|
-
require_relative 'deploy_rubygem_options'
|
5
4
|
|
6
5
|
# Set version for DeployRubygem
|
7
6
|
module DeployRubygem
|
8
|
-
def self.project_name
|
9
|
-
'deploy_rubygem'
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.new_deploy_rubygem
|
13
|
-
@self_project = Rubygem.new(DeployRubygemOptions.new.compile) if @self_project.nil?
|
14
|
-
@self_project
|
15
|
-
end
|
16
|
-
|
17
7
|
# VERSION = new_deploy_rubygem.gvb_version.short_version
|
18
|
-
VERSION = '0.60.
|
8
|
+
VERSION = '0.60.28'
|
19
9
|
end
|
data/lib/deploy_rubygem.rb
CHANGED
@@ -2,30 +2,40 @@
|
|
2
2
|
|
3
3
|
require_relative 'deploy_rubygem/version'
|
4
4
|
|
5
|
-
# DeployRubygem
|
5
|
+
# DeployRubygem module helper for rubygem
|
6
6
|
module DeployRubygem
|
7
|
-
def
|
8
|
-
DeployRubygem.
|
7
|
+
def rubygem_test
|
8
|
+
DeployRubygem.deployer
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
def self.exemple_cookbook
|
12
|
+
{
|
13
|
+
git: 'git@git.exemple.com:/Exemple/exemple_cookbook.git',
|
14
|
+
path: File.join(ENV['HOME'], 'jimbo_management_site'),
|
15
|
+
kitchens: %w[base],
|
16
|
+
compliance_profiles: {
|
17
|
+
input: 'compliance/inputs/user.yml',
|
18
|
+
profile: 'jimbodragon-management-site'
|
19
|
+
},
|
20
|
+
execute_profiles: %w[jimbodragon-accept],
|
21
|
+
groups: %w[base]
|
22
|
+
}
|
15
23
|
end
|
16
|
-
end
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
def self.deployer
|
26
|
+
chefrepo_path = File.join(%w[test exemple chefrepo])
|
27
|
+
project_options = {
|
28
|
+
project_name: 'rubygem_test',
|
29
|
+
git: 'git@git.exemple.com:/Exemple/rubygem',
|
30
|
+
chefrepo_git: 'git@git.exemple.com:/Exemple/chefrepo',
|
31
|
+
chefrepo_path: chefrepo_path,
|
32
|
+
binaries: %w[exemple_deploy],
|
33
|
+
dependencies: %w[deploy_rubygem],
|
34
|
+
path: File.join(chefrepo_path, %w[projects rubygem_test]),
|
35
|
+
cookbooks: {
|
36
|
+
exemple_cookbook: exemple_cookbook
|
37
|
+
}
|
38
|
+
}
|
39
|
+
@deployer ||= DeployRubygem::Project.new(project_options)
|
40
|
+
end
|
41
|
+
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.
|
4
|
+
version: 0.60.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Provencher
|
@@ -33,7 +33,7 @@ cert_chain:
|
|
33
33
|
n6Pwa3EckU/5n8N6gUJTAmGyu6Ncu1pbsZtH450+BJ2z82JNXomdFYlnG8+1XNlj
|
34
34
|
3M1sBFUHvqrBg2hQkQcLHokmQYrYsRK5A7HrxwKcmwM=
|
35
35
|
-----END CERTIFICATE-----
|
36
|
-
date: 2024-06-
|
36
|
+
date: 2024-06-12 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: rspec
|
@@ -128,7 +128,6 @@ files:
|
|
128
128
|
- lib/deploy_rubygem.rb
|
129
129
|
- lib/deploy_rubygem/chef_node.rb
|
130
130
|
- lib/deploy_rubygem/cookbook.rb
|
131
|
-
- lib/deploy_rubygem/deploy_rubygem_options.rb
|
132
131
|
- lib/deploy_rubygem/inspec_result.rb
|
133
132
|
- lib/deploy_rubygem/inspectestor.rb
|
134
133
|
- lib/deploy_rubygem/kitchen.rb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,106 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# DeployRubygem - deploy a gem using rake
|
4
|
-
# Containing a class
|
5
|
-
module DeployRubygem
|
6
|
-
# Using Inspec to deploy and manage Inspec
|
7
|
-
class DeployRubygemOptions
|
8
|
-
def project_name
|
9
|
-
'deploy_rubygem'
|
10
|
-
end
|
11
|
-
|
12
|
-
def git
|
13
|
-
'git@github.com:JimboDragonGit/deploy_rubygem.git'
|
14
|
-
end
|
15
|
-
|
16
|
-
def chefrepo_git
|
17
|
-
'git@github.com:JimboDragonGit/jimbodragon.git'
|
18
|
-
end
|
19
|
-
|
20
|
-
def chefrepo_path
|
21
|
-
'/usr/local/chef/repo/jimbodragon'
|
22
|
-
end
|
23
|
-
|
24
|
-
def binaries
|
25
|
-
%w[
|
26
|
-
deploy_rubygem
|
27
|
-
prepare_workstation
|
28
|
-
test_deploy_rubygem
|
29
|
-
deploy_jimbodragon
|
30
|
-
]
|
31
|
-
end
|
32
|
-
|
33
|
-
def dependencies
|
34
|
-
%w[
|
35
|
-
deploy_rubygem
|
36
|
-
jimbo_management_site
|
37
|
-
]
|
38
|
-
end
|
39
|
-
|
40
|
-
def path
|
41
|
-
File.join(ENV['HOME'], 'deploy_rubygem')
|
42
|
-
end
|
43
|
-
|
44
|
-
def jimbodragon_profiles
|
45
|
-
%w[
|
46
|
-
jimbodragon-accept
|
47
|
-
jimbodragon-applications
|
48
|
-
jimbodragon-deploy-context
|
49
|
-
jimbodragon-environment
|
50
|
-
jimbodragon-git
|
51
|
-
]
|
52
|
-
end
|
53
|
-
|
54
|
-
def workstation_profiles
|
55
|
-
%w[
|
56
|
-
jimbodragon-linux-baseline
|
57
|
-
jimbodragon-manual-push
|
58
|
-
jimbodragon-push
|
59
|
-
jimbodragon-services
|
60
|
-
jimbodragon-users
|
61
|
-
jimbodragon-workstation
|
62
|
-
]
|
63
|
-
end
|
64
|
-
|
65
|
-
def compliance_profiles
|
66
|
-
jimbodragon_profiles + workstation_profiles
|
67
|
-
end
|
68
|
-
|
69
|
-
def jimbo_management_site_cookbook
|
70
|
-
{
|
71
|
-
git: 'git@github.com:JimboDragonGit/jimbo_management_site.git',
|
72
|
-
path: File.join(ENV['HOME'], 'jimbo_management_site'),
|
73
|
-
kitchens: %w[base],
|
74
|
-
compliance_profiles: compliance_profiles,
|
75
|
-
execute_profiles: %w[jimbodragon-accept],
|
76
|
-
groups: %w[base]
|
77
|
-
}
|
78
|
-
end
|
79
|
-
|
80
|
-
def jimbo_management_site_profile
|
81
|
-
{
|
82
|
-
input: 'compliance/inputs/user.yml',
|
83
|
-
profile: 'jimbodragon-management-site'
|
84
|
-
}
|
85
|
-
end
|
86
|
-
|
87
|
-
def cookbooks
|
88
|
-
{
|
89
|
-
jimbo_management_site: jimbo_management_site_cookbook
|
90
|
-
}
|
91
|
-
end
|
92
|
-
|
93
|
-
def compile
|
94
|
-
{
|
95
|
-
project_name: project_name,
|
96
|
-
git: git,
|
97
|
-
chefrepo_git: chefrepo_git,
|
98
|
-
chefrepo_path: chefrepo_path,
|
99
|
-
binaries: binaries,
|
100
|
-
dependencies: dependencies,
|
101
|
-
path: path,
|
102
|
-
cookbooks: cookbooks
|
103
|
-
}
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|