packaging 0.99.59 → 0.99.60
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packaging/artifactory.rb +15 -5
- data/lib/packaging/platforms.rb +12 -123
- data/spec/lib/packaging/artifactory_spec.rb +24 -21
- data/spec/lib/packaging/config_spec.rb +7 -11
- data/spec/lib/packaging/paths_spec.rb +9 -11
- data/spec/lib/packaging/platforms_spec.rb +14 -14
- data/spec/lib/packaging/sign_spec.rb +0 -1
- data/spec/lib/packaging/util/ship_spec.rb +6 -19
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e8b1e8d8c9808cdd80c79e28d6519f13081ca834e0d4acd248172266bfed78e
|
4
|
+
data.tar.gz: e7bfb31ff88466e0b4f5a56869c5be06345a1973f573ec3c95bcde7379b007ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0717a42c7027cf767466e0cd86f0e69c1f9b4e69be18152016015de39f11f011fd905ceba6b948661f2290b2a23da2aaf50aa867b6c3238d79eb00a8e130cfd1
|
7
|
+
data.tar.gz: 28511e75d267dccd1a2d5d022729f46002d0847d2ea62a656882f3b9d1f4d73342d0d15cf9cb926c961704f316419a6c05b3fba930cc0d5ad332ae084c76fe67
|
@@ -235,7 +235,7 @@ module Pkg
|
|
235
235
|
#
|
236
236
|
# Currently we are including everything that would be included in the yaml
|
237
237
|
# file that is generated at package build time.
|
238
|
-
def deploy_properties(platform_tag)
|
238
|
+
def deploy_properties(platform_tag, file_name)
|
239
239
|
data = platform_specific_data(platform_tag)
|
240
240
|
|
241
241
|
# TODO This method should be returning the entire contents of the yaml
|
@@ -246,10 +246,15 @@ module Pkg
|
|
246
246
|
#properties_hash = Pkg::Config.config_to_hash
|
247
247
|
properties_hash = {}
|
248
248
|
if data[:package_format] == 'deb'
|
249
|
+
architecture = data[:architecture]
|
250
|
+
# set arch correctly for noarch packages
|
251
|
+
if file_name =~ /_all\.deb$/
|
252
|
+
architecture = 'all'
|
253
|
+
end
|
249
254
|
properties_hash.merge!({
|
250
255
|
'deb.distribution' => data[:codename],
|
251
256
|
'deb.component' => data[:repo_subdirectories],
|
252
|
-
'deb.architecture' =>
|
257
|
+
'deb.architecture' => architecture,
|
253
258
|
})
|
254
259
|
end
|
255
260
|
properties_hash
|
@@ -282,7 +287,7 @@ module Pkg
|
|
282
287
|
artifact.upload(
|
283
288
|
data[:repo_name],
|
284
289
|
File.join(data[:alternate_subdirectories], File.basename(package)),
|
285
|
-
deploy_properties(platform_tag),
|
290
|
+
deploy_properties(platform_tag, File.basename(package)),
|
286
291
|
headers
|
287
292
|
)
|
288
293
|
rescue
|
@@ -472,14 +477,19 @@ module Pkg
|
|
472
477
|
# @param local_path [String] local path to file to upload
|
473
478
|
# @param target_repo [String] repo on artifactory to upload to
|
474
479
|
# @param target_path [String] path within target_repo to upload to
|
475
|
-
|
480
|
+
# @param properties [Hash] Optional property names and values to assign the uploaded file
|
481
|
+
# For example, this would set both the 'cleanup.skip' and 'deb.component' properties:
|
482
|
+
# \{ "cleanup.skip" => true, "deb.component" => 'bionic' \}
|
483
|
+
# @param headers [Hash] Optional upload headers, most likely checksums, for the upload request
|
484
|
+
# "X-Checksum-Md5" and "X-Checksum-Sha1" are typical
|
485
|
+
def upload_file(local_path, target_repo, target_path, properties = {}, headers = {})
|
476
486
|
fail "Error: Couldn't find file at #{local_path}." unless File.exist? local_path
|
477
487
|
check_authorization
|
478
488
|
artifact = Artifactory::Resource::Artifact.new(local_path: local_path)
|
479
489
|
full_upload_path = File.join(target_path, File.basename(local_path))
|
480
490
|
begin
|
481
491
|
puts "Uploading #{local_path} to #{target_repo}/#{full_upload_path} . . ."
|
482
|
-
artifact.upload(target_repo, full_upload_path)
|
492
|
+
artifact.upload(target_repo, full_upload_path, properties, headers)
|
483
493
|
rescue Artifactory::Error::HTTPError => e
|
484
494
|
fail "Error: Upload failed. Ensure path #{target_path} exists in the #{target_repo} repository."
|
485
495
|
end
|
data/lib/packaging/platforms.rb
CHANGED
@@ -47,26 +47,7 @@ module Pkg
|
|
47
47
|
},
|
48
48
|
},
|
49
49
|
|
50
|
-
'cumulus' => {
|
51
|
-
'2.2' => {
|
52
|
-
codename: 'cumulus',
|
53
|
-
architectures: ['amd64'],
|
54
|
-
source_architecture: 'source',
|
55
|
-
package_format: 'deb',
|
56
|
-
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
57
|
-
repo: true,
|
58
|
-
},
|
59
|
-
},
|
60
|
-
|
61
50
|
'debian' => {
|
62
|
-
'7' => {
|
63
|
-
codename: 'wheezy',
|
64
|
-
architectures: ['amd64', 'i386'],
|
65
|
-
source_architecture: 'source',
|
66
|
-
package_format: 'deb',
|
67
|
-
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
68
|
-
repo: true,
|
69
|
-
},
|
70
51
|
'8' => {
|
71
52
|
codename: 'jessie',
|
72
53
|
architectures: ['amd64', 'i386', 'powerpc'],
|
@@ -103,7 +84,7 @@ module Pkg
|
|
103
84
|
repo: true,
|
104
85
|
},
|
105
86
|
'6' => {
|
106
|
-
architectures: ['x86_64', 'i386'
|
87
|
+
architectures: ['x86_64', 'i386'],
|
107
88
|
source_architecture: 'SRPMS',
|
108
89
|
package_format: 'rpm',
|
109
90
|
source_package_formats: ['src.rpm'],
|
@@ -111,7 +92,7 @@ module Pkg
|
|
111
92
|
repo: true,
|
112
93
|
},
|
113
94
|
'7' => {
|
114
|
-
architectures: ['x86_64', '
|
95
|
+
architectures: ['x86_64', 'ppc64le', 'aarch64'],
|
115
96
|
source_architecture: 'SRPMS',
|
116
97
|
package_format: 'rpm',
|
117
98
|
source_package_formats: ['src.rpm'],
|
@@ -128,87 +109,7 @@ module Pkg
|
|
128
109
|
}
|
129
110
|
},
|
130
111
|
|
131
|
-
'eos' => {
|
132
|
-
'4' => {
|
133
|
-
architectures: ['i386'],
|
134
|
-
package_format: 'swix',
|
135
|
-
repo: false,
|
136
|
-
},
|
137
|
-
},
|
138
|
-
|
139
112
|
'fedora' => {
|
140
|
-
'f25' => {
|
141
|
-
architectures: ['x86_64', 'i386'],
|
142
|
-
source_architecture: 'SRPMS',
|
143
|
-
package_format: 'rpm',
|
144
|
-
source_package_formats: ['src.rpm'],
|
145
|
-
signature_format: 'v4',
|
146
|
-
repo: true,
|
147
|
-
},
|
148
|
-
'f26' => {
|
149
|
-
architectures: ['x86_64'],
|
150
|
-
source_architecture: 'SRPMS',
|
151
|
-
package_format: 'rpm',
|
152
|
-
source_package_formats: ['src.rpm'],
|
153
|
-
signature_format: 'v4',
|
154
|
-
repo: true,
|
155
|
-
},
|
156
|
-
'f27' => {
|
157
|
-
architectures: ['x86_64'],
|
158
|
-
source_architecture: 'SRPMS',
|
159
|
-
package_format: 'rpm',
|
160
|
-
source_package_formats: ['src.rpm'],
|
161
|
-
signature_format: 'v4',
|
162
|
-
repo: true,
|
163
|
-
},
|
164
|
-
'f28' => {
|
165
|
-
architectures: ['x86_64'],
|
166
|
-
source_architecture: 'SRPMS',
|
167
|
-
package_format: 'rpm',
|
168
|
-
source_package_formats: ['src.rpm'],
|
169
|
-
signature_format: 'v4',
|
170
|
-
repo: true,
|
171
|
-
},
|
172
|
-
'25' => {
|
173
|
-
architectures: ['x86_64', 'i386'],
|
174
|
-
source_architecture: 'SRPMS',
|
175
|
-
package_format: 'rpm',
|
176
|
-
source_package_formats: ['src.rpm'],
|
177
|
-
signature_format: 'v4',
|
178
|
-
repo: true,
|
179
|
-
},
|
180
|
-
'26' => {
|
181
|
-
architectures: ['x86_64'],
|
182
|
-
source_architecture: 'SRPMS',
|
183
|
-
package_format: 'rpm',
|
184
|
-
source_package_formats: ['src.rpm'],
|
185
|
-
signature_format: 'v4',
|
186
|
-
repo: true,
|
187
|
-
},
|
188
|
-
'27' => {
|
189
|
-
architectures: ['x86_64'],
|
190
|
-
source_architecture: 'SRPMS',
|
191
|
-
package_format: 'rpm',
|
192
|
-
source_package_formats: ['src.rpm'],
|
193
|
-
signature_format: 'v4',
|
194
|
-
repo: true,
|
195
|
-
},
|
196
|
-
'28' => {
|
197
|
-
architectures: ['x86_64'],
|
198
|
-
source_architecture: 'SRPMS',
|
199
|
-
package_format: 'rpm',
|
200
|
-
source_package_formats: ['src.rpm'],
|
201
|
-
signature_format: 'v4',
|
202
|
-
repo: true,
|
203
|
-
},
|
204
|
-
'29' => {
|
205
|
-
architectures: ['x86_64'],
|
206
|
-
source_architecture: 'SRPMS',
|
207
|
-
package_format: 'rpm',
|
208
|
-
source_package_formats: ['src.rpm'],
|
209
|
-
signature_format: 'v4',
|
210
|
-
repo: true,
|
211
|
-
},
|
212
113
|
'30' => {
|
213
114
|
architectures: ['x86_64'],
|
214
115
|
source_architecture: 'SRPMS',
|
@@ -228,26 +129,6 @@ module Pkg
|
|
228
129
|
},
|
229
130
|
|
230
131
|
'osx' => {
|
231
|
-
'10.10' => {
|
232
|
-
architectures: ['x86_64'],
|
233
|
-
package_format: 'dmg',
|
234
|
-
repo: false,
|
235
|
-
},
|
236
|
-
'10.11' => {
|
237
|
-
architectures: ['x86_64'],
|
238
|
-
package_format: 'dmg',
|
239
|
-
repo: false,
|
240
|
-
},
|
241
|
-
'10.12' => {
|
242
|
-
architectures: ['x86_64'],
|
243
|
-
package_format: 'dmg',
|
244
|
-
repo: false,
|
245
|
-
},
|
246
|
-
'10.13' => {
|
247
|
-
architectures: ['x86_64'],
|
248
|
-
package_format: 'dmg',
|
249
|
-
repo: false,
|
250
|
-
},
|
251
132
|
'10.14' => {
|
252
133
|
architectures: ['x86_64'],
|
253
134
|
package_format: 'dmg',
|
@@ -273,7 +154,7 @@ module Pkg
|
|
273
154
|
|
274
155
|
'sles' => {
|
275
156
|
'11' => {
|
276
|
-
architectures: ['x86_64', 'i386'
|
157
|
+
architectures: ['x86_64', 'i386'],
|
277
158
|
source_architecture: 'SRPMS',
|
278
159
|
package_format: 'rpm',
|
279
160
|
source_package_formats: ['src.rpm'],
|
@@ -281,7 +162,7 @@ module Pkg
|
|
281
162
|
repo: true,
|
282
163
|
},
|
283
164
|
'12' => {
|
284
|
-
architectures: ['x86_64', '
|
165
|
+
architectures: ['x86_64', 'ppc64le'],
|
285
166
|
source_architecture: 'SRPMS',
|
286
167
|
package_format: 'rpm',
|
287
168
|
source_package_formats: ['src.rpm'],
|
@@ -344,6 +225,14 @@ module Pkg
|
|
344
225
|
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
345
226
|
repo: true,
|
346
227
|
},
|
228
|
+
'20.04' => {
|
229
|
+
codename: 'focal',
|
230
|
+
architectures: ['amd64'],
|
231
|
+
source_architecture: 'source',
|
232
|
+
package_format: 'deb',
|
233
|
+
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
234
|
+
repo: true,
|
235
|
+
},
|
347
236
|
},
|
348
237
|
|
349
238
|
'windows' => {
|
@@ -21,6 +21,11 @@ describe 'artifactory.rb' do
|
|
21
21
|
:repo_config => "../repo_configs/deb/pl-puppet-agent-f65f9efbb727c3d2d72d6799c0fc345a726f27b5-xenial.list",
|
22
22
|
:additional_artifacts => ["./deb/xenial/PC1/puppet-agent-extras_5.3.1.34.gf65f9ef-1xenial_amd64.deb"],
|
23
23
|
},
|
24
|
+
'debian-10-amd64' => {
|
25
|
+
:artifact => "./deb/buster/PC1/puppetdb_5.3.1.34.gf65f9ef-1buster_all.deb",
|
26
|
+
:repo_config => "../repo_configs/deb/pl-puppetdb-f65f9efbb727c3d2d72d6799c0fc345a726f27b5-buster.list",
|
27
|
+
:additional_artifacts => ["./deb/buster/PC1/puppetdb-termini_5.3.1.34.gf65f9ef-1buster_all.deb"],
|
28
|
+
},
|
24
29
|
'windows-2012-x86' => {
|
25
30
|
:artifact => "./windows/puppet-agent-5.3.1.34-x86.msi",
|
26
31
|
:repo_config => '',
|
@@ -31,15 +36,10 @@ describe 'artifactory.rb' do
|
|
31
36
|
:repo_config => '',
|
32
37
|
:additional_artifacts => ["./windowsfips/puppet-agent-extras-5.3.1.34-x64.msi"],
|
33
38
|
},
|
34
|
-
'
|
35
|
-
:artifact => "./
|
36
|
-
:repo_config => '',
|
37
|
-
:additional_artifacts => ["./eos/4/PC1/i386/puppet-agent-extras-5.3.1.34.gf65f9ef-1.eos4.i386.swix"],
|
38
|
-
},
|
39
|
-
'osx-10.12-x86_64' => {
|
40
|
-
:artifact => "./apple/10.12/PC1/x86_64/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.12.dmg",
|
39
|
+
'osx-10.15-x86_64' => {
|
40
|
+
:artifact => "./apple/10.15/PC1/x86_64/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.15.dmg",
|
41
41
|
:repo_config => '',
|
42
|
-
:additional_artifacts => ["./apple/10.
|
42
|
+
:additional_artifacts => ["./apple/10.15/PC1/x86_64/puppet-agent-extras-5.3.1.34.gf65f9ef-1.osx10.15.dmg"],
|
43
43
|
},
|
44
44
|
'solaris-10-sparc' => {
|
45
45
|
:artifact => "./solaris/10/PC1/puppet-agent-5.3.1.34.gf65f9ef-1.sparc.pkg.gz",
|
@@ -64,6 +64,14 @@ describe 'artifactory.rb' do
|
|
64
64
|
:package_name => 'path/to/a/xenial/package/puppet-agent_5.3.1.34.gf65f9ef-1xenial_amd64.deb',
|
65
65
|
:all_package_names => ['puppet-agent_5.3.1.34.gf65f9ef-1xenial_amd64.deb', 'puppet-agent-extras_5.3.1.34.gf65f9ef-1xenial_amd64.deb']
|
66
66
|
},
|
67
|
+
'debian-10-amd64' => {
|
68
|
+
:toplevel_repo => 'debian__local',
|
69
|
+
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/debian-10",
|
70
|
+
:codename => 'buster',
|
71
|
+
:arch => 'all',
|
72
|
+
:package_name => 'path/to/a/buster/package/puppetdb_5.3.1.34.gf65f9ef-1buster_all.deb',
|
73
|
+
:all_package_names => ['puppetdb_5.3.1.34.gf65f9ef-1buster_all.deb', 'puppetdb-termini_5.3.1.34.gf65f9ef-1buster_all.deb']
|
74
|
+
},
|
67
75
|
'windows-2012-x86' => {
|
68
76
|
:toplevel_repo => 'generic',
|
69
77
|
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/windows-x86",
|
@@ -76,17 +84,11 @@ describe 'artifactory.rb' do
|
|
76
84
|
:package_name => 'path/to/a/windowsfips/package/puppet-agent-5.3.1.34-x64.msi',
|
77
85
|
:all_package_names => ['puppet-agent-5.3.1.34-x64.msi','puppet-agent-extras-5.3.1.34-x64.msi']
|
78
86
|
},
|
79
|
-
'
|
80
|
-
:toplevel_repo => 'generic',
|
81
|
-
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/eos-4-i386",
|
82
|
-
:package_name => 'path/to/an/eos/4/package/puppet-agent-5.3.1.34.gf65f9ef-1.eos4.i386.swix',
|
83
|
-
:all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.eos4.i386.swix', 'puppet-agent-extras-5.3.1.34.gf65f9ef-1.eos4.i386.swix']
|
84
|
-
},
|
85
|
-
'osx-10.12-x86_64' => {
|
87
|
+
'osx-10.15-x86_64' => {
|
86
88
|
:toplevel_repo => 'generic',
|
87
|
-
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/osx-10.
|
88
|
-
:package_name => 'path/to/an/osx/10.
|
89
|
-
:all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.osx10.
|
89
|
+
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/osx-10.15-x86_64",
|
90
|
+
:package_name => 'path/to/an/osx/10.15/package/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.15.dmg',
|
91
|
+
:all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.osx10.15.dmg', 'puppet-agent-extras-5.3.1.34.gf65f9ef-1.osx10.15.dmg']
|
90
92
|
},
|
91
93
|
'solaris-10-sparc' => {
|
92
94
|
:toplevel_repo => 'generic',
|
@@ -186,12 +188,13 @@ describe 'artifactory.rb' do
|
|
186
188
|
describe '#deploy_properties' do
|
187
189
|
it "returns the correct contents for the deploy properties for #{platform_tag}" do
|
188
190
|
if platform_tag_data[:codename]
|
189
|
-
expect(artifact.deploy_properties(platform_tag)).to include({
|
191
|
+
expect(artifact.deploy_properties(platform_tag, File.basename(platform_tag_data[:package_name]))).to include({
|
190
192
|
'deb.distribution' => platform_tag_data[:codename],
|
191
|
-
'deb.component' => platform_tag_data[:repo_subdirectories]
|
193
|
+
'deb.component' => platform_tag_data[:repo_subdirectories],
|
194
|
+
'deb.architecture' => platform_tag_data[:arch]
|
192
195
|
})
|
193
196
|
else
|
194
|
-
expect(artifact.deploy_properties(platform_tag)).not_to include({
|
197
|
+
expect(artifact.deploy_properties(platform_tag, File.basename(platform_tag_data[:package_name]))).not_to include({
|
195
198
|
'deb.component' => platform_tag_data[:repo_subdirectories]
|
196
199
|
})
|
197
200
|
end
|
@@ -202,23 +202,19 @@ describe "Pkg::Config" do
|
|
202
202
|
|
203
203
|
describe "#platform_data" do
|
204
204
|
platform_tags = [
|
205
|
-
'
|
206
|
-
'osx-10.12-x86_64',
|
205
|
+
'osx-10.15-x86_64',
|
207
206
|
'cisco-wrlinux-7-x86_64',
|
208
207
|
'ubuntu-16.04-i386',
|
209
|
-
'
|
210
|
-
'el-6-s390x',
|
208
|
+
'el-6-x86_64',
|
211
209
|
'el-7-ppc64le',
|
212
210
|
'sles-12-x86_64',
|
213
211
|
]
|
214
212
|
|
215
213
|
artifacts = \
|
216
|
-
"./artifacts/
|
217
|
-
"./artifacts/apple/10.12/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.osx10.12.dmg\n" \
|
214
|
+
"./artifacts/apple/10.15/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.osx10.15.dmg\n" \
|
218
215
|
"./artifacts/cisco-wrlinux/7/PC1/x86_64/puppet-agent-5.3.2-1.cisco_wrlinux7.x86_64.rpm\n" \
|
219
216
|
"./artifacts/deb/xenial/PC1/puppet-agent_5.3.2-1xenial_i386.deb\n" \
|
220
|
-
"./artifacts/
|
221
|
-
"./artifacts/el/6/PC1/s390x/puppet-agent-5.3.2.658.gc79ef9a-1.el6.s390x.rpm\n" \
|
217
|
+
"./artifacts/el/6/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.el6.x86_64.rpm\n" \
|
222
218
|
"./artifacts/el/7/PC1/ppc64le/puppet-agent-5.3.2-1.el7.ppc64le.rpm\n" \
|
223
219
|
"./artifacts/sles/12/PC1/x86_64/puppet-agent-5.3.2-1.sles12.x86_64.rpm"
|
224
220
|
|
@@ -226,7 +222,7 @@ describe "Pkg::Config" do
|
|
226
222
|
"./artifacts/aix/6.1/PC1/ppc/puppet-agent-5.3.2-1.aix6.1.ppc.rpm"
|
227
223
|
|
228
224
|
fedora_artifacts = \
|
229
|
-
"./artifacts/fedora/
|
225
|
+
"./artifacts/fedora/31/PC1/x86_64/puppet-agent-5.3.2-1.fc31.x86_64.rpm"
|
230
226
|
|
231
227
|
windows_artifacts = \
|
232
228
|
"./artifacts/windows/puppet-agent-x64.msi\n" \
|
@@ -283,8 +279,8 @@ describe "Pkg::Config" do
|
|
283
279
|
it "should not use 'f' in fedora platform tags" do
|
284
280
|
allow(Pkg::Util::Net).to receive(:remote_ssh_cmd).and_return(fedora_artifacts, nil)
|
285
281
|
data = Pkg::Config.platform_data
|
286
|
-
expect(data).to include('fedora-
|
287
|
-
expect(data).not_to include('fedora-
|
282
|
+
expect(data).to include('fedora-31-x86_64')
|
283
|
+
expect(data).not_to include('fedora-f31-x86_64')
|
288
284
|
end
|
289
285
|
|
290
286
|
it "should collect packages whose extname differ from package_format" do
|
@@ -25,16 +25,14 @@ describe 'Pkg::Paths' do
|
|
25
25
|
'pkg/ubuntu-16.04-amd64/puppet-agent_4.99.0-1xenial_amd64.deb' => 'ubuntu-16.04-amd64',
|
26
26
|
'pkg/windows-x64/puppet-agent-4.99.0-x64.msi' => 'windows-2012-x64',
|
27
27
|
'artifacts/el/6/products/x86_64/pe-r10k-2.5.4.3-1.el6.x86_64.rpm' => 'el-6-x86_64',
|
28
|
-
'pkg/deb/trusty/pe-r10k_2.5.4.3-1trusty_amd64.deb' => 'ubuntu-14.04-amd64',
|
29
28
|
'pkg/pe/rpm/el-6-i386/pe-puppetserver-2017.3.0.3-1.el6.noarch.rpm' => 'el-6-i386',
|
29
|
+
'pkg/deb/trusty/pe-r10k_2.5.4.3-1trusty_amd64.deb' => 'ubuntu-14.04-amd64',
|
30
30
|
'pkg/pe/deb/xenial/pe-puppetserver_2017.3.0.3-1puppet1_all.deb' => 'ubuntu-16.04-amd64',
|
31
31
|
'pkg/pe/deb/xenial/super-trusty-package_1.0.0-1puppet1_all.deb' => 'ubuntu-16.04-amd64',
|
32
|
-
'artifacts/deb/
|
32
|
+
'artifacts/deb/stretch/PC1/puppetdb_4.3.1-1puppetlabs1_all.deb' => 'debian-9-amd64',
|
33
33
|
'pkg/el/7/PC1/x86_64/puppetdb-4.3.1-1.el7.noarch.rpm' => 'el-7-x86_64',
|
34
|
-
'pkg/apple/10.
|
35
|
-
'artifacts/mac/10.
|
36
|
-
'artifacts/eos/4/PC1/i386/puppet-agent-1.9.0-1.eos4.i386.swix' => 'eos-4-i386',
|
37
|
-
'pkg/deb/cumulus/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1cumulus_amd64.deb' => 'cumulus-2.2-amd64',
|
34
|
+
'pkg/apple/10.14/PC1/x86_64/puppet-agent-1.9.0-1.osx10.14.dmg' => 'osx-10.14-x86_64',
|
35
|
+
'artifacts/mac/10.15/PC1/x86_64/puppet-agent-1.9.0-1.osx10.15.dmg' => 'osx-10.15-x86_64',
|
38
36
|
'pkg/windows/puppet-agent-1.9.0-x86.msi' => 'windows-2012-x86',
|
39
37
|
'artifacts/ubuntu-16.04-i386/puppetserver_5.0.1-0.1SNAPSHOT.2017.07.27T2346puppetlabs1.debian.tar.gz' => 'ubuntu-16.04-source',
|
40
38
|
'http://saturn.puppetlabs.net/deb_repos/1234abcd/repos/apt/xenial' => 'ubuntu-16.04-amd64',
|
@@ -96,8 +94,8 @@ describe 'Pkg::Paths' do
|
|
96
94
|
expect(Pkg::Paths.artifacts_path('el-7-x86_64')).to eq('artifacts/puppet5/el/7/x86_64')
|
97
95
|
end
|
98
96
|
|
99
|
-
it 'should be correct for
|
100
|
-
expect(Pkg::Paths.artifacts_path('ubuntu-
|
97
|
+
it 'should be correct for bionic' do
|
98
|
+
expect(Pkg::Paths.artifacts_path('ubuntu-18.04-amd64')).to eq('artifacts/bionic/puppet5')
|
101
99
|
end
|
102
100
|
|
103
101
|
it 'should be correct for solaris 11' do
|
@@ -105,7 +103,7 @@ describe 'Pkg::Paths' do
|
|
105
103
|
end
|
106
104
|
|
107
105
|
it 'should be correct for osx' do
|
108
|
-
expect(Pkg::Paths.artifacts_path('osx-10.
|
106
|
+
expect(Pkg::Paths.artifacts_path('osx-10.15-x86_64')).to eq('artifacts/mac/puppet5/10.15/x86_64')
|
109
107
|
end
|
110
108
|
|
111
109
|
it 'should be correct for windows' do
|
@@ -250,7 +248,7 @@ describe 'Pkg::Paths' do
|
|
250
248
|
expect(Pkg::Paths.remote_repo_base('ubuntu-18.04-amd64')).to eq('bar')
|
251
249
|
end
|
252
250
|
it 'returns nonfinal_yum_repo_path for nonfinal rpms' do
|
253
|
-
expect(Pkg::Paths.remote_repo_base('fedora-
|
251
|
+
expect(Pkg::Paths.remote_repo_base('fedora-31-x86_64', true)).to eq('foo-nightly')
|
254
252
|
end
|
255
253
|
it 'returns nonfinal_apt_repo_path for nonfinal debs' do
|
256
254
|
expect(Pkg::Paths.remote_repo_base('debian-9-amd64', true)).to eq('bar-nightly')
|
@@ -304,7 +302,7 @@ describe 'Pkg::Paths' do
|
|
304
302
|
expect(Pkg::Paths.release_package_link_path('debian-9-i386', true)).to eq("#{nonfinal_apt_repo_path}/#{nonfinal_repo_name}-release-stretch.deb")
|
305
303
|
end
|
306
304
|
it 'returns nil for package formats that do not have release packages' do
|
307
|
-
expect(Pkg::Paths.release_package_link_path('osx-10.
|
305
|
+
expect(Pkg::Paths.release_package_link_path('osx-10.15-x86_64')).to eq(nil)
|
308
306
|
expect(Pkg::Paths.release_package_link_path('windows-2012-x86')).to eq(nil)
|
309
307
|
end
|
310
308
|
end
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe 'Pkg::Platforms' do
|
4
4
|
describe '#by_package_format' do
|
5
5
|
it 'should return an array of platforms that use a given format' do
|
6
|
-
deb_platforms = ['
|
6
|
+
deb_platforms = ['debian', 'ubuntu']
|
7
7
|
rpm_platforms = ['aix', 'cisco-wrlinux', 'el', 'fedora', 'redhatfips', 'sles']
|
8
8
|
expect(Pkg::Platforms.by_package_format('deb')).to match_array(deb_platforms)
|
9
9
|
expect(Pkg::Platforms.by_package_format('rpm')).to match_array(rpm_platforms)
|
@@ -12,14 +12,14 @@ describe 'Pkg::Platforms' do
|
|
12
12
|
|
13
13
|
describe '#formats' do
|
14
14
|
it 'should return all package formats' do
|
15
|
-
fmts = ['rpm', 'deb', '
|
15
|
+
fmts = ['rpm', 'deb', 'dmg', 'svr4', 'ips', 'msi']
|
16
16
|
expect(Pkg::Platforms.formats).to match_array(fmts)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
describe '#supported_platforms' do
|
21
21
|
it 'should return all supported platforms' do
|
22
|
-
platforms = ['aix', 'cisco-wrlinux', '
|
22
|
+
platforms = ['aix', 'cisco-wrlinux', 'debian', 'el', 'fedora', 'osx', 'redhatfips', 'sles', 'solaris', 'ubuntu', 'windows', 'windowsfips']
|
23
23
|
expect(Pkg::Platforms.supported_platforms).to match_array(platforms)
|
24
24
|
end
|
25
25
|
end
|
@@ -36,7 +36,7 @@ describe 'Pkg::Platforms' do
|
|
36
36
|
|
37
37
|
describe '#codenames' do
|
38
38
|
it 'should return all codenames for a given platform' do
|
39
|
-
codenames = ['
|
39
|
+
codenames = ['focal', 'bionic', 'buster', 'cosmic', 'jessie', 'stretch', 'trusty', 'xenial']
|
40
40
|
expect(Pkg::Platforms.codenames).to match_array(codenames)
|
41
41
|
end
|
42
42
|
end
|
@@ -59,27 +59,27 @@ describe 'Pkg::Platforms' do
|
|
59
59
|
|
60
60
|
describe '#arches_for_codename' do
|
61
61
|
it 'should return an array of arches corresponding to a given codename' do
|
62
|
-
expect(Pkg::Platforms.arches_for_codename('
|
62
|
+
expect(Pkg::Platforms.arches_for_codename('xenial')).to match_array(['amd64', 'i386', 'ppc64el'])
|
63
63
|
end
|
64
64
|
|
65
65
|
it 'should be able to include source archietectures' do
|
66
|
-
expect(Pkg::Platforms.arches_for_codename('
|
66
|
+
expect(Pkg::Platforms.arches_for_codename('xenial', true)).to match_array(["amd64", "i386", "ppc64el", "source"])
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
describe '#codename_to_tags' do
|
71
71
|
it 'should return an array of platform tags corresponding to a given codename' do
|
72
|
-
expect(Pkg::Platforms.codename_to_tags('
|
72
|
+
expect(Pkg::Platforms.codename_to_tags('xenial')).to match_array(['ubuntu-16.04-i386', 'ubuntu-16.04-amd64', "ubuntu-16.04-ppc64el"])
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
76
|
describe '#arches_for_platform_version' do
|
77
77
|
it 'should return an array of arches for a given platform and version' do
|
78
|
-
expect(Pkg::Platforms.arches_for_platform_version('sles', '
|
78
|
+
expect(Pkg::Platforms.arches_for_platform_version('sles', '12')).to match_array(['x86_64', 'ppc64le'])
|
79
79
|
end
|
80
80
|
|
81
81
|
it 'should be able to include source architectures' do
|
82
|
-
expect(Pkg::Platforms.arches_for_platform_version('sles', '
|
82
|
+
expect(Pkg::Platforms.arches_for_platform_version('sles', '12', true)).to match_array(["SRPMS", "ppc64le", "x86_64"])
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
@@ -98,12 +98,12 @@ describe 'Pkg::Platforms' do
|
|
98
98
|
|
99
99
|
describe '#platform_lookup' do
|
100
100
|
it 'should return a hash of platform info' do
|
101
|
-
expect(Pkg::Platforms.platform_lookup('osx-10.
|
101
|
+
expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64')).to be_instance_of(Hash)
|
102
102
|
end
|
103
103
|
|
104
104
|
it 'should include at least arch and package format keys' do
|
105
|
-
expect(Pkg::Platforms.platform_lookup('osx-10.
|
106
|
-
expect(Pkg::Platforms.platform_lookup('osx-10.
|
105
|
+
expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64').keys).to include(:architectures)
|
106
|
+
expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64').keys).to include(:package_format)
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
@@ -113,7 +113,7 @@ describe 'Pkg::Platforms' do
|
|
113
113
|
end
|
114
114
|
|
115
115
|
it 'fails with a reasonable error when specified attribute is not defined' do
|
116
|
-
expect { Pkg::Platforms.get_attribute('
|
116
|
+
expect { Pkg::Platforms.get_attribute('osx-10.15-x86_64', :signature_format) }.to raise_error(/doesn't have information/)
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
@@ -137,7 +137,7 @@ describe 'Pkg::Platforms' do
|
|
137
137
|
'windows-2012' => ['windows', '2012', ''],
|
138
138
|
'redhatfips-7-x86_64' => ['redhatfips', '7', 'x86_64'],
|
139
139
|
'el-7-SRPMS' => ['el', '7', 'SRPMS'],
|
140
|
-
'ubuntu-
|
140
|
+
'ubuntu-16.04-source' => ['ubuntu', '16.04', 'source'],
|
141
141
|
}
|
142
142
|
|
143
143
|
fail_cases = [
|
@@ -74,7 +74,6 @@ DOC
|
|
74
74
|
] }
|
75
75
|
let(:v4_rpms) { [
|
76
76
|
"#{rpm_directory}/el/7/PC1/aarch64/puppet-agent-5.5.3-1.el7.aarch64.rpm",
|
77
|
-
"#{rpm_directory}/sles/12/PC1/s390x/puppet-agent-5.5.3-1.sles12.s390x.rpm",
|
78
77
|
] }
|
79
78
|
let(:rpms) { rpms_not_to_sign + v3_rpms + v4_rpms }
|
80
79
|
let(:already_signed_rpms) { [
|
@@ -8,15 +8,6 @@ describe '#Pkg::Util::Ship' do
|
|
8
8
|
'pkg/windowsfips/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x64.msi',
|
9
9
|
'pkg/windowsfips/puppet5/puppet-agent-x64.msi'
|
10
10
|
]
|
11
|
-
swix_pkgs = [
|
12
|
-
'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix',
|
13
|
-
'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
|
14
|
-
]
|
15
|
-
|
16
|
-
it 'returns an array of packages found on the filesystem' do
|
17
|
-
allow(Dir).to receive(:glob).with('pkg/**/*.swix*').and_return(swix_pkgs)
|
18
|
-
expect(Pkg::Util::Ship.collect_packages(['pkg/**/*.swix*'])).to eq(swix_pkgs)
|
19
|
-
end
|
20
11
|
|
21
12
|
describe 'define excludes' do
|
22
13
|
before :each do
|
@@ -43,23 +34,19 @@ describe '#Pkg::Util::Ship' do
|
|
43
34
|
end
|
44
35
|
|
45
36
|
local_pkgs = [
|
46
|
-
'pkg/deb/
|
47
|
-
'pkg/deb/wheezy/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1wheezy_i386.deb',
|
37
|
+
'pkg/deb/stretch/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1stretch_i386.deb',
|
48
38
|
'pkg/el/5/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.el5.x86_64.rpm',
|
49
39
|
'pkg/sles/11/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.sles11.i386.rpm',
|
50
|
-
'pkg/
|
51
|
-
'pkg/
|
52
|
-
'pkg/eos/4/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
|
40
|
+
'pkg/sles/12/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.sles12.x86_64.rpm',
|
41
|
+
'pkg/mac/10.15/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.15.dmg',
|
53
42
|
'pkg/windows/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x86.msi',
|
54
43
|
]
|
55
44
|
new_pkgs = [
|
56
|
-
'pkg/
|
57
|
-
'pkg/wheezy/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1wheezy_i386.deb',
|
45
|
+
'pkg/stretch/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1stretch_i386.deb',
|
58
46
|
'pkg/puppet5/el/5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.el5.x86_64.rpm',
|
59
47
|
'pkg/puppet5/sles/11/i386/puppet-agent-1.4.1.2904.g8023dd1-1.sles11.i386.rpm',
|
60
|
-
'pkg/
|
61
|
-
'pkg/
|
62
|
-
'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
|
48
|
+
'pkg/puppet5/sles/12/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.sles12.x86_64.rpm',
|
49
|
+
'pkg/mac/puppet5/10.15/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.15.dmg',
|
63
50
|
'pkg/windows/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x86.msi',
|
64
51
|
]
|
65
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.99.
|
4
|
+
version: 0.99.60
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -244,28 +244,28 @@ signing_key:
|
|
244
244
|
specification_version: 4
|
245
245
|
summary: Puppet Labs' packaging automation
|
246
246
|
test_files:
|
247
|
+
- spec/lib/packaging_spec.rb
|
247
248
|
- spec/lib/packaging/config_spec.rb
|
249
|
+
- spec/lib/packaging/retrieve_spec.rb
|
250
|
+
- spec/lib/packaging/repo_spec.rb
|
248
251
|
- spec/lib/packaging/tar_spec.rb
|
249
|
-
- spec/lib/packaging/
|
250
|
-
- spec/lib/packaging/
|
252
|
+
- spec/lib/packaging/rpm/repo_spec.rb
|
253
|
+
- spec/lib/packaging/deb_spec.rb
|
254
|
+
- spec/lib/packaging/sign_spec.rb
|
251
255
|
- spec/lib/packaging/deb/repo_spec.rb
|
256
|
+
- spec/lib/packaging/util/net_spec.rb
|
252
257
|
- spec/lib/packaging/util/ship_spec.rb
|
253
|
-
- spec/lib/packaging/util/
|
258
|
+
- spec/lib/packaging/util/gpg_spec.rb
|
254
259
|
- spec/lib/packaging/util/file_spec.rb
|
255
|
-
- spec/lib/packaging/util/
|
260
|
+
- spec/lib/packaging/util/os_spec.rb
|
261
|
+
- spec/lib/packaging/util/git_spec.rb
|
262
|
+
- spec/lib/packaging/util/git_tag_spec.rb
|
263
|
+
- spec/lib/packaging/util/rake_utils_spec.rb
|
256
264
|
- spec/lib/packaging/util/jenkins_spec.rb
|
257
265
|
- spec/lib/packaging/util/execution_spec.rb
|
258
|
-
- spec/lib/packaging/util/
|
266
|
+
- spec/lib/packaging/util/version_spec.rb
|
259
267
|
- spec/lib/packaging/util/misc_spec.rb
|
260
|
-
- spec/lib/packaging/
|
261
|
-
- spec/lib/packaging/util/gpg_spec.rb
|
262
|
-
- spec/lib/packaging/util/git_tag_spec.rb
|
263
|
-
- spec/lib/packaging/util/git_spec.rb
|
264
|
-
- spec/lib/packaging/paths_spec.rb
|
265
|
-
- spec/lib/packaging/repo_spec.rb
|
266
|
-
- spec/lib/packaging/sign_spec.rb
|
267
|
-
- spec/lib/packaging/rpm/repo_spec.rb
|
268
|
+
- spec/lib/packaging/platforms_spec.rb
|
268
269
|
- spec/lib/packaging/gem_spec.rb
|
269
|
-
- spec/lib/packaging/
|
270
|
-
- spec/lib/packaging/
|
271
|
-
- spec/lib/packaging_spec.rb
|
270
|
+
- spec/lib/packaging/paths_spec.rb
|
271
|
+
- spec/lib/packaging/artifactory_spec.rb
|