packaging 0.109.1 → 0.109.3
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/gem.rb +10 -2
- data/tasks/ship.rake +27 -18
- metadata +17 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4b1debe2d5b8b3f8eba5525251ff49b861c3934c892ee2e0d022bb6b35fbecb
|
|
4
|
+
data.tar.gz: 4ccf51e8c80d24ff4ed5cba8422d06e8c33eb96dd5d136cad7e47f5863abfa99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d95cf48ac1b357e1fdd25872db2b123fe7ca542508689e58beab6757b367acc1a323660dc182c99baefc4aea1858236c215c72f6113879a0eb923241d9e2d9a8
|
|
7
|
+
data.tar.gz: d976fe3c0f19f81fd261232716b121def43096ceecfb9393c005922e69d7bb7a06e1d6ff7ab7b4e9efdf2d0026cc1b0d4d0209f42a5243d5530f886ca7292d9b
|
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
|
-
|
|
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)
|
data/tasks/ship.rake
CHANGED
|
@@ -124,32 +124,41 @@ namespace :pl do
|
|
|
124
124
|
|
|
125
125
|
desc "Update remote ips repository on #{Pkg::Config.ips_host}"
|
|
126
126
|
task :update_ips_repo => 'pl:fetch' do
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
# This could be pkg/ips/pkgs/{i386,sparc} or pkg/solaris/11/{i386,sparc}
|
|
128
|
+
p5p_files = Dir.glob('pkg/**/*.p5p')
|
|
129
|
+
if p5p_files.empty?
|
|
130
|
+
puts "Error: there aren't any p5p packages in pkg/ips/pkgs or pkg/solaris/11."
|
|
129
131
|
next
|
|
130
132
|
end
|
|
131
133
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
# This makes the historical assumption that all p5p files we want to ship exist in
|
|
135
|
+
# just one directory.
|
|
136
|
+
source_directory = File.dirname(p5p_files.first)
|
|
137
|
+
remote_working_directory = Pkg::Util::Net.remote_execute(
|
|
136
138
|
Pkg::Config.ips_host,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
)
|
|
140
|
-
tmpdir.chomp!
|
|
139
|
+
'mktemp -d -p /var/tmp',
|
|
140
|
+
{ capture_output: true }
|
|
141
|
+
)[0].chomp
|
|
141
142
|
|
|
142
|
-
Pkg::Util::Net.rsync_to(
|
|
143
|
+
Pkg::Util::Net.rsync_to(
|
|
144
|
+
"#{source_directory}/",
|
|
145
|
+
Pkg::Config.ips_host, remote_working_directory
|
|
146
|
+
)
|
|
143
147
|
|
|
144
|
-
|
|
145
|
-
sudo pkgrecv -s $
|
|
148
|
+
pkgrecv_scriptlet = %(for p5p_file in #{remote_working_directory}/*.p5p; do
|
|
149
|
+
sudo pkgrecv -s $p5p_file -d #{Pkg::Config.ips_path} '*';
|
|
146
150
|
done)
|
|
147
151
|
|
|
148
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.ips_host,
|
|
149
|
-
Pkg::Util::Net.remote_execute(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.ips_host, pkgrecv_scriptlet)
|
|
153
|
+
Pkg::Util::Net.remote_execute(
|
|
154
|
+
Pkg::Config.ips_host,
|
|
155
|
+
"sudo pkgrepo refresh -s #{Pkg::Config.ips_path}"
|
|
156
|
+
)
|
|
157
|
+
ips_repository = Pkg::Config.ips_repo || 'default'
|
|
158
|
+
Pkg::Util::Net.remote_execute(
|
|
159
|
+
Pkg::Config.ips_host,
|
|
160
|
+
"sudo /usr/sbin/svcadm restart svc:/application/pkg/server:#{ips_repository}"
|
|
161
|
+
)
|
|
153
162
|
end
|
|
154
163
|
|
|
155
164
|
desc "Move dmg repos from #{Pkg::Config.dmg_staging_server} to #{Pkg::Config.dmg_host}"
|
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.
|
|
4
|
+
version: 0.109.3
|
|
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-
|
|
11
|
+
date: 2023-03-16 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/
|
|
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/
|
|
320
|
+
- spec/lib/packaging/util/gpg_spec.rb
|
|
317
321
|
- spec/lib/packaging/util/jenkins_spec.rb
|
|
318
|
-
- spec/lib/packaging/util/
|
|
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/
|
|
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/
|
|
335
|
-
- spec/lib/packaging/
|
|
333
|
+
- spec/lib/packaging/repo_spec.rb
|
|
334
|
+
- spec/lib/packaging/retrieve_spec.rb
|
|
335
|
+
- spec/lib/packaging_spec.rb
|