packaging 0.99.48 → 0.99.49

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: c9b1ac8c003ac90a5214eed7c8ba0452b2d264b093a1e33918951821e77abc1c
4
- data.tar.gz: dffd6a141ca0c206e56a3a5f9d92f3d5fd43db33df13955485afb5598d020575
3
+ metadata.gz: 68bf2734bf72e5f9bad6d03c640d28ce516c05b1a5163b20ebf385676e829ae6
4
+ data.tar.gz: f54bbad1bd7b25f0e92cd7527de1e03513b557fa4e31db0751f23cd9139d30a6
5
5
  SHA512:
6
- metadata.gz: ad5e4b3b0f541647b482692c8bca84ab17772a9875c569793f9dd2ec0aeeac6912ec7cc93ac49d417defc3a8c4e863d0975e91aa9b968d33cfdacadcdeada80c
7
- data.tar.gz: 7c4c851417fb6fec73fd833a6cd753f29847cc9a097d5a972fadae0482a76a5073e7073405307af2099db23ffb6458b6b7fd758015cb36c924f4aedc39371cfc
6
+ metadata.gz: 272b2c612425b4ee0226063c54d7bbbfeb5d5de4162050eb716c3acff4f65282741c528ab9f7290e4a987dae436c268632c7d7556eba9bea77c9feb05f9fc1c2
7
+ data.tar.gz: 5995160e79dbf3258fe5e212cd646bee4f9f9bdfc19acdb4780c02f3acea628408f504fbffbca42b7e4ff98600893a37a87d0ecb6e90834c0e4b68f3a73f6109
@@ -366,7 +366,7 @@ module Pkg
366
366
  name: artifact_name, :artifactory_uri => @artifactory_uri)
367
367
 
368
368
  if artifact_search_results.empty?
369
- raise "Error: could not find PKG=#{pkg} at REF=#{git_ref} for #{platform_tag}"
369
+ raise "Error: could not find PKG=#{pkg} at REF=#{ref} for #{platform_tag}"
370
370
  end
371
371
  artifact_to_promote = artifact_search_results[0]
372
372
 
@@ -415,10 +415,13 @@ module Pkg
415
415
  packages.each do |name, info|
416
416
  artifact_to_download = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"]).first
417
417
  if artifact_to_download.nil?
418
- raise "Error: what the hell, could not find package #{info["filename"]} with md5sum #{info["md5"]}"
418
+ filename = info["filename"] || info["name"]
419
+ raise "Error: what the hell, could not find package #{filename} with md5sum #{info["md5"]}"
419
420
  else
420
- puts "downloading #{artifact_to_download.download_uri}"
421
- artifact_to_download.download("#{staging_directory}/#{dist}", filename: "#{info["filename"]}")
421
+ full_staging_path = "#{staging_directory}/#{dist}"
422
+ filename = info['filename'] || File.basename(artifact_to_download.download_uri)
423
+ puts "downloading #{artifact_to_download.download_uri} to #{File.join(full_staging_path, filename)}"
424
+ artifact_to_download.download(full_staging_path, filename: filename)
422
425
  end
423
426
  end
424
427
  end
@@ -557,7 +560,11 @@ module Pkg
557
560
  final_tarballs.each do |artifact|
558
561
  next unless artifact.download_uri.include? remote_path
559
562
  next if artifact.download_uri.include? "-rc"
560
- artifact.copy("#{repo}/#{target_path}")
563
+ filename = File.basename(artifact.download_uri)
564
+ # Artifactory does NOT like when you use `File.join`, so let's concatenate!
565
+ full_target_path = "#{repo}/#{target_path}/#{filename}"
566
+ puts "INFO: Copying #{filename} to #{full_target_path} . . ."
567
+ artifact.copy(full_target_path)
561
568
  end
562
569
  end
563
570
 
@@ -571,18 +578,20 @@ module Pkg
571
578
  packages.each do |name, info|
572
579
  artifact = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"]).first
573
580
  if artifact.nil?
574
- raise "Error: what the hell, could not find package #{info["filename"]} with md5sum #{info["md5"]}"
581
+ filename = info["filename"] || info["name"]
582
+ raise "Error: what the hell, could not find package #{filename} with md5sum #{info["md5"]}"
575
583
  end
576
584
  begin
577
- artifact_target_path = "#{artifact.repo}/#{target_path}/#{dist}/#{info["filename"]}"
585
+ filename = info["filename"] || File.basename(artifact.download_uri)
586
+ artifact_target_path = "#{artifact.repo}/#{target_path}/#{dist}/#{filename}"
578
587
  puts "Copying #{artifact.download_uri} to #{artifact_target_path}"
579
588
  artifact.copy(artifact_target_path)
580
589
  rescue Artifactory::Error::HTTPError
581
590
  STDERR.puts "Could not copy #{artifact_target_path}. Source and destination are the same. Skipping..."
582
591
  end
583
- if File.extname(info["filename"]) == '.deb'
584
- copied_artifact_search = Artifactory::Resource::Artifact.pattern_search(repo: 'debian_enterprise__local', pattern: "#{target_path}/*/#{info["filename"]}")
585
- fail "Error: what the hell, could not find just-copied package #{info["filename"]} under debian_enterprise__local/#{target_path}" if copied_artifact_search.nil?
592
+ if File.extname(filename) == '.deb'
593
+ copied_artifact_search = Artifactory::Resource::Artifact.pattern_search(repo: 'debian_enterprise__local', pattern: "#{target_path}/*/#{filename}")
594
+ fail "Error: what the hell, could not find just-copied package #{filename} under debian_enterprise__local/#{target_path}" if copied_artifact_search.nil?
586
595
  copied_artifact = copied_artifact_search.first
587
596
  properties = { 'deb.component' => Pkg::Paths.debian_component_from_path(target_path) }
588
597
  copied_artifact.properties(properties)
@@ -217,6 +217,14 @@ module Pkg
217
217
  signature_format: 'v4',
218
218
  repo: true,
219
219
  },
220
+ '31' => {
221
+ architectures: ['x86_64'],
222
+ source_architecture: 'SRPMS',
223
+ package_format: 'rpm',
224
+ source_package_formats: ['src.rpm'],
225
+ signature_format: 'v4',
226
+ repo: true,
227
+ },
220
228
  },
221
229
 
222
230
  'osx' => {
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.48
4
+ version: 0.99.49
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-12 00:00:00.000000000 Z
11
+ date: 2019-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec