packaging 0.99.36 → 0.99.37
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: '00950af34ff87fe079bb7aa3b27208d926850829'
|
4
|
+
data.tar.gz: '08b8a218302985b1cd124009244e26607627f33f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5e016cd4ed877ea0d99ee8ac96d5408ec4c77f9fa6f013e1a9c0d0bd99490b327fa415a1ad733ced31701968b9a8d3d40d1d0050b27524ec5d510da79f5205e
|
7
|
+
data.tar.gz: 59b87cb7a030363fa6f621f9a7df6798c6b617143f8b72bd1d793f638633b0d8dc763f34bf41484377d659ca6c66b416a8f213221270a5de8172d85184619cc6
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'open-uri'
|
3
|
+
require 'digest'
|
3
4
|
|
4
5
|
module Pkg
|
5
6
|
|
@@ -318,6 +319,46 @@ module Pkg
|
|
318
319
|
end
|
319
320
|
end
|
320
321
|
|
322
|
+
# Using the manifest provided by enterprise-dist, grab the appropropriate packages from artifactory based on md5sum
|
323
|
+
# @param staging_directory [String] location to download packages to
|
324
|
+
# @param manifest [File] JSON file containing information about what packages to download and the corresponding md5sums
|
325
|
+
def download_packages(staging_directory, manifest)
|
326
|
+
check_authorization
|
327
|
+
manifest.each do |dist, packages|
|
328
|
+
puts "Grabbing the #{dist} packages from artifactory"
|
329
|
+
packages.each do |name, info|
|
330
|
+
artifact_to_download = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"]).first
|
331
|
+
if artifact_to_download.nil?
|
332
|
+
raise "Error: what the hell, could not find package #{info["filename"]} with md5sum #{info["md5"]}"
|
333
|
+
else
|
334
|
+
puts "downloading #{artifact_to_download.download_uri}"
|
335
|
+
artifact_to_download.download("#{staging_directory}/#{dist}", filename: "#{info["filename"]}")
|
336
|
+
end
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
# Ship PE tarballs to specified artifactory repo and paths
|
342
|
+
# @param tarball_path [String] the path of the tarballs to ship
|
343
|
+
# @param target_repo [String] the artifactory repo to ship the tarballs to
|
344
|
+
# @param ship_paths [Array] the artifactory path(s) to ship the tarballs to within the target_repo
|
345
|
+
def ship_pe_tarballs(tarball_path, target_repo, ship_paths)
|
346
|
+
check_authorization
|
347
|
+
Dir.foreach("#{tarball_path}/") do |pe_tarball|
|
348
|
+
unless pe_tarball == '.' || pe_tarball == ".."
|
349
|
+
ship_paths.each do |path|
|
350
|
+
begin
|
351
|
+
puts "Uploading #{pe_tarball} to #{target_repo}/#{path}... "
|
352
|
+
artifact = Artifactory::Resource::Artifact.new(local_path: "#{tarball_path}/#{pe_tarball}")
|
353
|
+
artifact.upload(target_repo, "/#{path}/#{pe_tarball}")
|
354
|
+
rescue Errno::EPIPE
|
355
|
+
STDERR.puts "Error: Could not upload #{pe_tarball} to #{path}"
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
|
321
362
|
private :check_authorization
|
322
363
|
end
|
323
364
|
end
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/fixtures/config/ext/../params.yaml
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
spec/fixtures/config/ext/../params.yaml
|
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.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -225,33 +225,34 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
225
|
- !ruby/object:Gem::Version
|
226
226
|
version: '0'
|
227
227
|
requirements: []
|
228
|
-
|
228
|
+
rubyforge_project:
|
229
|
+
rubygems_version: 2.6.9
|
229
230
|
signing_key:
|
230
231
|
specification_version: 4
|
231
232
|
summary: Puppet Labs' packaging automation
|
232
233
|
test_files:
|
233
234
|
- spec/lib/packaging/paths_spec.rb
|
234
|
-
- spec/lib/packaging/gem_spec.rb
|
235
|
-
- spec/lib/packaging/repo_spec.rb
|
236
|
-
- spec/lib/packaging/platforms_spec.rb
|
237
|
-
- spec/lib/packaging/tar_spec.rb
|
238
|
-
- spec/lib/packaging/rpm/repo_spec.rb
|
239
235
|
- spec/lib/packaging/sign_spec.rb
|
240
|
-
- spec/lib/packaging/artifactory_spec.rb
|
241
|
-
- spec/lib/packaging/deb_spec.rb
|
242
|
-
- spec/lib/packaging/retrieve_spec.rb
|
243
236
|
- spec/lib/packaging/config_spec.rb
|
244
|
-
- spec/lib/packaging/deb/repo_spec.rb
|
245
|
-
- spec/lib/packaging/util/jenkins_spec.rb
|
246
237
|
- spec/lib/packaging/util/execution_spec.rb
|
247
|
-
- spec/lib/packaging/util/
|
248
|
-
- spec/lib/packaging/util/
|
238
|
+
- spec/lib/packaging/util/os_spec.rb
|
239
|
+
- spec/lib/packaging/util/version_spec.rb
|
249
240
|
- spec/lib/packaging/util/git_spec.rb
|
250
|
-
- spec/lib/packaging/util/
|
251
|
-
- spec/lib/packaging/util/gpg_spec.rb
|
241
|
+
- spec/lib/packaging/util/jenkins_spec.rb
|
252
242
|
- spec/lib/packaging/util/rake_utils_spec.rb
|
253
|
-
- spec/lib/packaging/util/
|
243
|
+
- spec/lib/packaging/util/gpg_spec.rb
|
254
244
|
- spec/lib/packaging/util/git_tag_spec.rb
|
255
|
-
- spec/lib/packaging/util/version_spec.rb
|
256
245
|
- spec/lib/packaging/util/file_spec.rb
|
246
|
+
- spec/lib/packaging/util/net_spec.rb
|
247
|
+
- spec/lib/packaging/util/misc_spec.rb
|
248
|
+
- spec/lib/packaging/util/ship_spec.rb
|
249
|
+
- spec/lib/packaging/repo_spec.rb
|
250
|
+
- spec/lib/packaging/tar_spec.rb
|
251
|
+
- spec/lib/packaging/retrieve_spec.rb
|
252
|
+
- spec/lib/packaging/platforms_spec.rb
|
253
|
+
- spec/lib/packaging/deb_spec.rb
|
254
|
+
- spec/lib/packaging/deb/repo_spec.rb
|
255
|
+
- spec/lib/packaging/rpm/repo_spec.rb
|
256
|
+
- spec/lib/packaging/gem_spec.rb
|
257
|
+
- spec/lib/packaging/artifactory_spec.rb
|
257
258
|
- spec/lib/packaging_spec.rb
|