packaging 0.99.48 → 0.99.49
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
- data/lib/packaging/artifactory.rb +19 -10
- data/lib/packaging/platforms.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68bf2734bf72e5f9bad6d03c640d28ce516c05b1a5163b20ebf385676e829ae6
|
|
4
|
+
data.tar.gz: f54bbad1bd7b25f0e92cd7527de1e03513b557fa4e31db0751f23cd9139d30a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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=#{
|
|
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
|
-
|
|
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
|
-
|
|
421
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
584
|
-
copied_artifact_search = Artifactory::Resource::Artifact.pattern_search(repo: 'debian_enterprise__local', pattern: "#{target_path}/*/#{
|
|
585
|
-
fail "Error: what the hell, could not find just-copied package #{
|
|
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)
|
data/lib/packaging/platforms.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|