beaker-puppet 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTBjMzQ0ZjEzZTNkMDI3ODE1NGIwYWU2YzllZDA3NjFhNmU1YmM3ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzY0ZWZiNTEzNDk0M2YwZTdlODcxNWQyM2E3MWRiYWE5YWNkNzE4YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmRiOTAwYjU1NDU5ODBhZjdiMmFmNTIwODcxNGRhNDhhZWYzODA1YWJlYWZi
|
10
|
+
NTFlYzU5NjMwMTY3ZWZiODc4YjUxMjE0MGVkMmE0YzdkNTE2Njg0NDVhMmZm
|
11
|
+
MjEyMTliNTRhNGNmNmVhZGMxNjYzZGFhNWZhYjExOTk2MmNmZTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODczODMyZjcwZWNhNTgwMzg5YTljYTBiNTM4MWIzYmQ4MTkwNmVkYTE5ZGQ2
|
14
|
+
YWE0NGFhNDNiY2EwMGYwNWYyZDU0YmRhNmM2NzJjODYzNzc4MWM2OWZkMjg1
|
15
|
+
YjBlNDAxM2I0YWIwNzVhNjI1ZjNiN2MzMTBiNDFkODY2N2EyZTU=
|
@@ -24,10 +24,6 @@ module BeakerPuppet
|
|
24
24
|
)
|
25
25
|
file_hash = YAML.load_file( sha_yaml_file_local_path )
|
26
26
|
|
27
|
-
logger.debug("YAML HASH BELOW:")
|
28
|
-
logger.debug(file_hash)
|
29
|
-
logger.debug("PLATFORM_DATA BELOW:")
|
30
|
-
logger.debug(file_hash[:platform_data])
|
31
27
|
return sha_yaml_folder_url, file_hash[:platform_data]
|
32
28
|
end
|
33
29
|
|
@@ -85,36 +81,48 @@ module BeakerPuppet
|
|
85
81
|
#
|
86
82
|
# @return nil
|
87
83
|
def install_artifact_on(host, artifact_url, project_name)
|
88
|
-
variant,
|
89
|
-
|
90
|
-
|
91
|
-
host.get_remote_file(
|
92
|
-
onhost_package_file = File.basename(
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
84
|
+
variant, version, _, _ = host[:platform].to_array
|
85
|
+
case variant
|
86
|
+
when 'eos'
|
87
|
+
host.get_remote_file(artifact_url)
|
88
|
+
onhost_package_file = File.basename(artifact_url)
|
89
|
+
# TODO Will be refactored into {Beaker::Host#install_local_package}
|
90
|
+
# immediately following this work. The release timing makes it
|
91
|
+
# necessary to have this here separately for a short while
|
92
|
+
host.install_from_file(onhost_package_file)
|
93
|
+
when 'solaris'
|
94
|
+
artifact_filename = File.basename(artifact_url)
|
95
|
+
artifact_folder = File.dirname(artifact_url)
|
96
|
+
fetch_http_file(artifact_folder, artifact_filename, '.')
|
97
|
+
onhost_package_dir = host.tmpdir('puppet_installer')
|
98
98
|
scp_to host, artifact_filename, onhost_package_dir
|
99
|
-
onhost_package_file = "#{
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
99
|
+
onhost_package_file = "#{onhost_package_dir}/#{artifact_filename}"
|
100
|
+
host.install_local_package(onhost_package_file, '.')
|
101
|
+
when 'osx'
|
102
|
+
on host, "curl -O #{artifact_url}"
|
103
|
+
onhost_package_file = "#{project_name}*"
|
104
|
+
host.install_local_package(onhost_package_file)
|
105
|
+
when 'windows'
|
106
|
+
install_msi_on(host, artifact_url)
|
107
|
+
when 'aix'
|
108
|
+
artifact_filename = File.basename(artifact_url)
|
109
|
+
artifact_folder = File.dirname(artifact_url)
|
110
|
+
fetch_http_file(artifact_folder, artifact_filename, '.')
|
111
|
+
onhost_package_dir = host.tmpdir('puppet_installer')
|
112
|
+
scp_to host, artifact_filename, onhost_package_dir
|
113
|
+
onhost_package_file = "#{onhost_package_dir}/#{artifact_filename}"
|
104
114
|
|
105
|
-
if variant == 'eos'
|
106
115
|
# TODO Will be refactored into {Beaker::Host#install_local_package}
|
107
116
|
# immediately following this work. The release timing makes it
|
108
|
-
# necessary to have this here
|
109
|
-
|
110
|
-
|
111
|
-
if
|
112
|
-
|
113
|
-
else
|
114
|
-
host.install_local_package( onhost_package_file )
|
117
|
+
# necessary to have this here seperately for a short while
|
118
|
+
# NOTE: the AIX 7.1 package will only install on 7.2 with
|
119
|
+
# --ignoreos. This is a bug in package building on AIX 7.1's RPM
|
120
|
+
if version == "7.2"
|
121
|
+
aix_72_ignoreos_hack = "--ignoreos"
|
115
122
|
end
|
123
|
+
on host, "rpm -ivh #{aix_72_ignoreos_hack} #{onhost_package_file}"
|
116
124
|
else
|
117
|
-
host.install_package(
|
125
|
+
host.install_package(artifact_url)
|
118
126
|
end
|
119
127
|
end
|
120
128
|
|
@@ -139,9 +139,10 @@ describe ClassMixedWithDSLInstallUtils do
|
|
139
139
|
|
140
140
|
let( :artifact_url ) { 'url://in/the/jungle/lies/the/prize.pnc' }
|
141
141
|
let( :platform ) { @platform || 'linux' }
|
142
|
+
let( :version ) { @version || '' }
|
142
143
|
let( :mock_platform ) {
|
143
144
|
mock_platform = Object.new
|
144
|
-
allow( mock_platform ).to receive( :to_array ) { [platform,
|
145
|
+
allow( mock_platform ).to receive( :to_array ) { [platform, version, '', ''] }
|
145
146
|
mock_platform
|
146
147
|
}
|
147
148
|
let( :host ) {
|
@@ -159,6 +160,23 @@ describe ClassMixedWithDSLInstallUtils do
|
|
159
160
|
subject.install_artifact_on( host, artifact_url, 'project_name' )
|
160
161
|
end
|
161
162
|
|
163
|
+
it 'installs from a file on EOS' do
|
164
|
+
@platform = 'eos'
|
165
|
+
|
166
|
+
expect(host).to receive(:get_remote_file).with(artifact_url)
|
167
|
+
expect(host).to receive(:install_from_file).with(File.basename(artifact_url))
|
168
|
+
|
169
|
+
subject.install_artifact_on(host, artifact_url, 'project_name')
|
170
|
+
end
|
171
|
+
|
172
|
+
it 'install an MSI from a URL on Windows' do
|
173
|
+
@platform = 'windows'
|
174
|
+
|
175
|
+
expect(subject).to receive(:install_msi_on).with(host, artifact_url)
|
176
|
+
|
177
|
+
subject.install_artifact_on(host, artifact_url, 'project_name')
|
178
|
+
end
|
179
|
+
|
162
180
|
context 'local install cases' do
|
163
181
|
|
164
182
|
def run_shared_test_steps
|
@@ -182,6 +200,33 @@ describe ClassMixedWithDSLInstallUtils do
|
|
182
200
|
run_shared_test_steps()
|
183
201
|
end
|
184
202
|
|
203
|
+
it 'AIX: fetches the file & runs local install' do
|
204
|
+
@platform = 'aix'
|
205
|
+
@version = '7.2'
|
206
|
+
|
207
|
+
expect( subject ).to receive( :fetch_http_file ).once
|
208
|
+
expect( subject ).to receive( :scp_to ).once
|
209
|
+
expect( subject ).to receive( :on ).with( host, /^rpm -ivh --ignoreos .*#{File.basename(artifact_url)}$/ ).once
|
210
|
+
|
211
|
+
expect( host ).to receive( :install_local_package ).never
|
212
|
+
expect( host ).to receive( :install_package ).never
|
213
|
+
subject.install_artifact_on( host, artifact_url, 'project_name' )
|
214
|
+
end
|
215
|
+
|
216
|
+
it 'AIX 6.1: fetches the file & runs local install' do
|
217
|
+
@platform = 'aix'
|
218
|
+
@version = '6.1'
|
219
|
+
|
220
|
+
expect( subject ).to receive( :fetch_http_file ).once
|
221
|
+
expect( subject ).to receive( :scp_to ).once
|
222
|
+
expect( subject ).to receive( :on ).with( host, /^rpm -ivh .*#{File.basename(artifact_url)}$/ ).once
|
223
|
+
expect( subject ).not_to receive( :on ).with( host, /^rpm -ivh --ignoreos .*#{File.basename(artifact_url)}$/ )
|
224
|
+
|
225
|
+
expect( host ).to receive( :install_local_package ).never
|
226
|
+
expect( host ).to receive( :install_package ).never
|
227
|
+
subject.install_artifact_on( host, artifact_url, 'project_name' )
|
228
|
+
end
|
229
|
+
|
185
230
|
end
|
186
231
|
|
187
232
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|