packaging 0.99.37 → 0.99.38
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 +5 -5
- data/lib/packaging/artifactory.rb +23 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: e47617ee3014f4fd9eb47a7f38c53c0a15573363091c17f87670b1c281b9bafe
|
|
4
|
+
data.tar.gz: 23d23d26df1c5ee217a141f9013cf4aec511053da2232e32f5c1c70421808646
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed155c04c8f8ca3f99592d3b9edb55f8479d7fcfb8fb02f1573d35b686f9ebda8303968521fa78154d252455b5c2162b3e50db962002f76e3c693ead7d8500c9
|
|
7
|
+
data.tar.gz: 1e5e6a6706704e11027ddd644ffae8e3b1d8c78ce475e40bff92a4ae169a839fa1d2e9b6ab353bae847a8aba78a32c99c233b3ea47a92cca7acb3dc3f1afcdef
|
|
@@ -359,6 +359,29 @@ module Pkg
|
|
|
359
359
|
end
|
|
360
360
|
end
|
|
361
361
|
|
|
362
|
+
# Remove shipped PE tarballs from artifactory
|
|
363
|
+
# Used when compose fails, we only want the tarball shipped to artifactory if all platforms succeed
|
|
364
|
+
# Identify which packages were created and shipped based on md5sum and remove them
|
|
365
|
+
# @param tarball_path [String] the local path to the tarballs that were shipped
|
|
366
|
+
# @param pe_repo [String] the artifactory repo the tarballs were shipped to
|
|
367
|
+
def purge_copied_pe_tarballs(tarball_path, pe_repo)
|
|
368
|
+
check_authorization
|
|
369
|
+
Dir.foreach("#{tarball_path}/") do |pe_tarball|
|
|
370
|
+
next if pe_tarball == '.' || pe_tarball == ".."
|
|
371
|
+
md5 = Digest::MD5.file("#{tarball_path}/#{pe_tarball}").hexdigest
|
|
372
|
+
artifacts_to_delete = Artifactory::Resource::Artifact.checksum_search(md5: md5, repos: pe_repo)
|
|
373
|
+
next if artifacts_to_delete.nil?
|
|
374
|
+
begin
|
|
375
|
+
artifacts_to_delete.each do |artifact|
|
|
376
|
+
puts "Removing #{pe_tarball} from #{pe_repo}... "
|
|
377
|
+
artifact.delete
|
|
378
|
+
end
|
|
379
|
+
rescue Artifactory::Error::HTTPError
|
|
380
|
+
STDERR.puts "Error: cannot remove #{pe_tarball}, do you have the right permissions?"
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
|
|
362
385
|
private :check_authorization
|
|
363
386
|
end
|
|
364
387
|
end
|
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.38
|
|
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-08-
|
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
226
226
|
version: '0'
|
|
227
227
|
requirements: []
|
|
228
228
|
rubyforge_project:
|
|
229
|
-
rubygems_version: 2.6
|
|
229
|
+
rubygems_version: 2.7.6
|
|
230
230
|
signing_key:
|
|
231
231
|
specification_version: 4
|
|
232
232
|
summary: Puppet Labs' packaging automation
|