packaging 0.109.2 → 0.109.4

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: 21fbe7adf35d302cad689b2f4ca536f499c6d805e33da1ec091c7b7dcd672ffc
4
- data.tar.gz: dccc381590b0cec0ad69b413b2c9680c1d95fe6bbcd041073e179faae9693134
3
+ metadata.gz: 763f416372eab86acfcb1ce21c3f0cd519db708bdd34d6323c44fc5ff4ade8f9
4
+ data.tar.gz: 428db33628cbaddde9017048c067e224682b1c97c9235af05c8923e5983c3881
5
5
  SHA512:
6
- metadata.gz: 81e93d2e4375be0ead7790a7cef9bb17e395b0e4ada9ee67926e5f422e24cfdc079cb5a51f3fc5bac87bccc1b6520cf09355eb99796be2df118ae352c8204daa
7
- data.tar.gz: 5083b56f76a63f2c2e825a45ee87fdeac1ed2d19cd4adfa7046f8133339cd1212d0377878ca3dede7d984a3506c64b421b7aafb0c4ea71e16a890d79e2bab2a7
6
+ metadata.gz: 793b50af9892164876bd3b873d36c6bc797dea847501c2819993f0178df43835d611f55fbc61d557fa991e66d31c4d21fb2dcd2cfcc36a97e8a231015483ff1e
7
+ data.tar.gz: 877c87ed7fe102d2dfa1fc658a7d9952c1206678a92c7b915bbfcfdab982e8234f56ccba8e18a10e30e1b7945b3559d33ace6d713baf503ae2ff1bd0d5c53d18
data/lib/packaging/gem.rb CHANGED
@@ -48,7 +48,7 @@ module Pkg::Gem
48
48
  gem_push_command = "gem push #{file}"
49
49
  gem_push_command << " --host #{options[:host]}" if options[:host]
50
50
  gem_push_command << " --key #{options[:key]}" if options[:key]
51
- Pkg::Util::Execution.capture3(gem_push_command)
51
+ Pkg::Util::Execution.capture3(gem_push_command, true)
52
52
  rescue StandardError => e
53
53
  puts "###########################################"
54
54
  puts "# Publishing to rubygems failed. Make sure your .gem/credentials"
@@ -56,7 +56,15 @@ module Pkg::Gem
56
56
  puts "###########################################"
57
57
  puts
58
58
  puts e
59
- raise e
59
+ # There appears to be a race condition where the rubygems versions api will not
60
+ # be updated in time between builders attempting to push a gem. We want to avoid
61
+ # failing here due to gem already being pushed, so if we identify this error
62
+ # we can just log it and move on. NOTE: the gem push documentation does not
63
+ # appear to provide a distinct error code for this kind of error so we rely on
64
+ # string matching the stdout/stderr from the Pkg::Uti::execution method.
65
+ unless e.message.match(/Repushing of gem versions is not allowed/)
66
+ raise e
67
+ end
60
68
  end
61
69
 
62
70
  def ship_to_internal_mirror(file)
@@ -32,6 +32,14 @@ module Pkg::Sign::Dmg
32
32
 
33
33
  dmg_basenames = dmgs.map { |d| File.basename(d, '.dmg') }.join(' ')
34
34
 
35
+ # (See: RE-15379) Refactor opportunity; we really shouldn't do this this way.
36
+ # When it works, it's fine, but diagnosing problems when we or Apple change
37
+ # the details is a pain. We should either have a script on the signing machine
38
+ # that does this work OR we should ship a script to the signing directory that
39
+ # can be modified/repeated when problems arise.
40
+ #
41
+ # Note especially, the '-size 200m' hack in the 'hdiutil create' command. This
42
+ # is useful but arbitrary at the moment and could cause problems in the future.
35
43
  sign_package_command = %W[
36
44
  for dmg in #{dmg_basenames}; do
37
45
  /usr/bin/hdiutil attach #{remote_working_directory}/$dmg.dmg
@@ -55,7 +63,7 @@ module Pkg::Sign::Dmg
55
63
 
56
64
  /usr/bin/hdiutil detach #{dmg_mount_point} -quiet ;
57
65
  /bin/rm #{remote_working_directory}/$dmg.dmg ;
58
- /usr/bin/hdiutil create -volname $dmg
66
+ /usr/bin/hdiutil create -volname $dmg -size 200m
59
67
  -srcfolder #{signed_items_directory}/ #{remote_working_directory}/$dmg.dmg ;
60
68
  /bin/rm #{signed_items_directory}/* ;
61
69
  done
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.109.2
4
+ version: 0.109.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet By Perforce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug
@@ -308,28 +308,28 @@ signing_key:
308
308
  specification_version: 4
309
309
  summary: Puppet by Perforce packaging automation
310
310
  test_files:
311
- - spec/lib/packaging_spec.rb
311
+ - spec/lib/packaging/gem_spec.rb
312
312
  - spec/lib/packaging/paths_spec.rb
313
+ - spec/lib/packaging/platforms_spec.rb
313
314
  - spec/lib/packaging/rpm/repo_spec.rb
315
+ - spec/lib/packaging/util/git_tag_spec.rb
316
+ - spec/lib/packaging/util/version_spec.rb
317
+ - spec/lib/packaging/util/net_spec.rb
314
318
  - spec/lib/packaging/util/ship_spec.rb
315
319
  - spec/lib/packaging/util/os_spec.rb
316
- - spec/lib/packaging/util/git_spec.rb
320
+ - spec/lib/packaging/util/gpg_spec.rb
317
321
  - spec/lib/packaging/util/jenkins_spec.rb
318
- - spec/lib/packaging/util/file_spec.rb
322
+ - spec/lib/packaging/util/git_spec.rb
323
+ - spec/lib/packaging/util/misc_spec.rb
319
324
  - spec/lib/packaging/util/rake_utils_spec.rb
325
+ - spec/lib/packaging/util/file_spec.rb
320
326
  - spec/lib/packaging/util/execution_spec.rb
321
- - spec/lib/packaging/util/net_spec.rb
322
- - spec/lib/packaging/util/version_spec.rb
323
- - spec/lib/packaging/util/misc_spec.rb
324
- - spec/lib/packaging/util/gpg_spec.rb
325
- - spec/lib/packaging/util/git_tag_spec.rb
326
- - spec/lib/packaging/deb/repo_spec.rb
327
- - spec/lib/packaging/retrieve_spec.rb
328
- - spec/lib/packaging/gem_spec.rb
327
+ - spec/lib/packaging/tar_spec.rb
329
328
  - spec/lib/packaging/config_spec.rb
330
- - spec/lib/packaging/repo_spec.rb
329
+ - spec/lib/packaging/deb/repo_spec.rb
330
+ - spec/lib/packaging/sign_spec.rb
331
331
  - spec/lib/packaging/deb_spec.rb
332
- - spec/lib/packaging/platforms_spec.rb
333
332
  - spec/lib/packaging/artifactory_spec.rb
334
- - spec/lib/packaging/tar_spec.rb
335
- - spec/lib/packaging/sign_spec.rb
333
+ - spec/lib/packaging/repo_spec.rb
334
+ - spec/lib/packaging/retrieve_spec.rb
335
+ - spec/lib/packaging_spec.rb