packaging 0.99.14 → 0.99.15
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/README.md +2 -2
- data/lib/packaging/config/params.rb +3 -1
- data/lib/packaging/gem.rb +10 -2
- data/lib/packaging/platforms.rb +8 -0
- data/lib/packaging/sign/dmg.rb +6 -1
- data/lib/packaging/sign/msi.rb +21 -17
- data/spec/lib/packaging/config_spec.rb +1 -0
- data/spec/lib/packaging/platforms_spec.rb +1 -1
- data/tasks/ship.rake +16 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca6653015d4e31dbea9cfa4b0136806f5e69c20a
|
|
4
|
+
data.tar.gz: 14e5a1a07951e3ab6dec659999b2e834849ef12e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 431aba7afd7ece6a6c07586487ce0aa7a5e40ae5dfc9f4df2e7728378e5c62b582de1849a5752aeb21c22697c26ed74cfb1a14fabaff08a8f6d1661f728db3c1
|
|
7
|
+
data.tar.gz: 4ef0b19842d16f4c80b01de5fdb06affc2ce66f00b4ba94575acf84d51cc0fed4b0b3f3b0e7a25efff539c8902427d73a63ef9ac623a6ba63dcc337d4d28ff35
|
data/README.md
CHANGED
|
@@ -135,7 +135,7 @@ groups, e.g. to use mock on the builder, membership in the mock group. This is
|
|
|
135
135
|
a major hurdle, and is resolved with the `jenkins` tasks below.
|
|
136
136
|
|
|
137
137
|
## legacy `:jenkins:` workflow tasks
|
|
138
|
-
(Deprecated - see "
|
|
138
|
+
(Deprecated - see "dynamic jenkins task workflow" below)
|
|
139
139
|
Jenkins tasks are similar to the `:remote:` tasks, but they do not require ssh
|
|
140
140
|
access to the builders. They do require being on the local network - the
|
|
141
141
|
jenkins instance that performs package builds is an internal server only,
|
|
@@ -502,7 +502,7 @@ author: 'Puppet'
|
|
|
502
502
|
email: 'info@puppet.com'
|
|
503
503
|
homepage: 'https://github.com/puppetlabs/hiera'
|
|
504
504
|
summary: 'Light weight hierarchical data store'
|
|
505
|
-
description: 'A pluggable data store for
|
|
505
|
+
description: 'A pluggable data store for hierarchical data'
|
|
506
506
|
# file containing hard coded version information, if present
|
|
507
507
|
version_file: '/lib/hiera.rb'
|
|
508
508
|
# A string indicating the version strategy for the project (one of 'odd_even' or 'rc_final'), defaults to rc_final
|
|
@@ -106,6 +106,7 @@ module Pkg::Params
|
|
|
106
106
|
:nonfinal_apt_repo_path,
|
|
107
107
|
:nonfinal_apt_repo_staging_path,
|
|
108
108
|
:nonfinal_dmg_path,
|
|
109
|
+
:nonfinal_gem_path,
|
|
109
110
|
:nonfinal_ips_path,
|
|
110
111
|
:nonfinal_msi_path,
|
|
111
112
|
:nonfinal_p5p_path,
|
|
@@ -243,6 +244,7 @@ module Pkg::Params
|
|
|
243
244
|
{ :var => :nonfinal_apt_repo_path, :envvar => :NONFINAL_APT_REPO_PATH },
|
|
244
245
|
{ :var => :nonfinal_apt_repo_staging_path, :envvar => :NONFINAL_APT_REPO_STAGING_PATH },
|
|
245
246
|
{ :var => :nonfinal_dmg_path, :envvar => :NONFINAL_DMG_PATH },
|
|
247
|
+
{ :var => :nonfinal_gem_path, :envvar => :NONFINAL_GEM_PATH },
|
|
246
248
|
{ :var => :nonfinal_ips_path, :envvar => :NONFINAL_IPS_PATH },
|
|
247
249
|
{ :var => :nonfinal_msi_path, :envvar => :NONFINAL_MSI_PATH },
|
|
248
250
|
{ :var => :nonfinal_p5p_path, :envvar => :NONFINAL_P5P_PATH },
|
|
@@ -305,7 +307,7 @@ module Pkg::Params
|
|
|
305
307
|
{ :var => :build_data_repo, :val => 'https://github.com/puppetlabs/build-data.git' },
|
|
306
308
|
{ :var => :build_date, :val => Pkg::Util::Date.timestamp('-') },
|
|
307
309
|
{ :var => :release, :val => '1' },
|
|
308
|
-
{ :var => :internal_gem_host, :val => 'https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems
|
|
310
|
+
{ :var => :internal_gem_host, :val => 'https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems' },
|
|
309
311
|
{ :var => :build_tar, :val => true },
|
|
310
312
|
{ :var => :dev_build, :val => false },
|
|
311
313
|
{ :var => :osx_signing_cert, :val => '$OSX_SIGNING_CERT' },
|
data/lib/packaging/gem.rb
CHANGED
|
@@ -18,9 +18,12 @@ module Pkg::Gem
|
|
|
18
18
|
# Ship a Ruby gem file to rubygems.org. Requires the existence
|
|
19
19
|
# of a ~/.gem/credentials file or else rubygems.org won't have
|
|
20
20
|
# any idea who you are.
|
|
21
|
-
def ship_to_rubygems(file)
|
|
21
|
+
def ship_to_rubygems(file, options = {})
|
|
22
22
|
Pkg::Util::File.file_exists?("#{ENV['HOME']}/.gem/credentials", :required => true)
|
|
23
|
-
|
|
23
|
+
gem_push_command = "gem push #{file}"
|
|
24
|
+
gem_push_command << " --host #{options[:host]}" if options[:host]
|
|
25
|
+
gem_push_command << " --key #{options[:key]}" if options[:key]
|
|
26
|
+
Pkg::Util::Execution.capture3(gem_push_command)
|
|
24
27
|
rescue => e
|
|
25
28
|
puts "###########################################"
|
|
26
29
|
puts "# Publishing to rubygems failed. Make sure your .gem/credentials"
|
|
@@ -30,5 +33,10 @@ module Pkg::Gem
|
|
|
30
33
|
puts e
|
|
31
34
|
raise e
|
|
32
35
|
end
|
|
36
|
+
|
|
37
|
+
def ship_to_internal_mirror(file)
|
|
38
|
+
internal_mirror_api_key_name = 'artifactory_api_key'
|
|
39
|
+
ship_to_rubygems(file, { :host => Pkg::Config.internal_gem_host, :key => internal_mirror_api_key_name })
|
|
40
|
+
end
|
|
33
41
|
end
|
|
34
42
|
end
|
data/lib/packaging/platforms.rb
CHANGED
|
@@ -294,6 +294,14 @@ module Pkg
|
|
|
294
294
|
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
|
295
295
|
repo: true,
|
|
296
296
|
},
|
|
297
|
+
'18.10' => {
|
|
298
|
+
codename: 'cosmic',
|
|
299
|
+
architectures: ['amd64', 'ppc64el'],
|
|
300
|
+
source_architecture: 'source',
|
|
301
|
+
package_format: 'deb',
|
|
302
|
+
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
|
303
|
+
repo: true,
|
|
304
|
+
},
|
|
297
305
|
},
|
|
298
306
|
|
|
299
307
|
'windows' => {
|
data/lib/packaging/sign/dmg.rb
CHANGED
|
@@ -22,7 +22,12 @@ module Pkg::Sign::Dmg
|
|
|
22
22
|
/usr/bin/hdiutil attach #{work_dir}/$dmg.dmg -mountpoint #{mount} -nobrowse -quiet ;
|
|
23
23
|
/usr/bin/security -q unlock-keychain -p "#{Pkg::Config.osx_signing_keychain_pw}" "#{Pkg::Config.osx_signing_keychain}" ;
|
|
24
24
|
for pkg in $(ls #{mount}/*.pkg | xargs -n 1 basename); do
|
|
25
|
-
/usr/
|
|
25
|
+
if /usr/sbin/pkgutil --check-signature #{mount}/$pkg ; then
|
|
26
|
+
echo "$pkg is already signed, skipping . . ." ;
|
|
27
|
+
cp #{mount}/$pkg #{signed}/$pkg ;
|
|
28
|
+
else
|
|
29
|
+
/usr/bin/productsign --keychain "#{Pkg::Config.osx_signing_keychain}" --sign "#{Pkg::Config.osx_signing_cert}" #{mount}/$pkg #{signed}/$pkg ;
|
|
30
|
+
fi
|
|
26
31
|
done
|
|
27
32
|
/usr/bin/hdiutil detach #{mount} -quiet ;
|
|
28
33
|
/bin/rm #{work_dir}/$dmg.dmg ;
|
data/lib/packaging/sign/msi.rb
CHANGED
|
@@ -63,23 +63,27 @@ module Pkg::Sign::Msi
|
|
|
63
63
|
# Once we no longer support Windows 8/Windows Vista, we can remove the
|
|
64
64
|
# first Sha1 signature.
|
|
65
65
|
Pkg::Util::Net.remote_ssh_cmd(ssh_host_string, %Q(for msi in #{msis.map { |d| File.basename(d) }.join(" ")}; do
|
|
66
|
-
"/cygdrive/c/tools/osslsigncode-fork/osslsigncode.exe"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
if "/cygdrive/c/tools/osslsigncode-fork/osslsigncode.exe" verify -in "C:/#{work_dir}/$msi" ; then
|
|
67
|
+
echo "$msi is already signed, skipping . . ." ;
|
|
68
|
+
else
|
|
69
|
+
"/cygdrive/c/tools/osslsigncode-fork/osslsigncode.exe" sign \
|
|
70
|
+
-n "Puppet" -i "http://www.puppet.com" \
|
|
71
|
+
-h sha1 \
|
|
72
|
+
-pkcs12 "#{Pkg::Config.msi_signing_cert}" \
|
|
73
|
+
-pass "#{Pkg::Config.msi_signing_cert_pw}" \
|
|
74
|
+
-t "http://timestamp.verisign.com/scripts/timstamp.dll" \
|
|
75
|
+
-in "C:/#{work_dir}/$msi" \
|
|
76
|
+
-out "C:/#{work_dir}/signed-$msi"
|
|
77
|
+
"/cygdrive/c/tools/osslsigncode-fork/osslsigncode.exe" sign \
|
|
78
|
+
-n "Puppet" -i "http://www.puppet.com" \
|
|
79
|
+
-nest -h sha256 \
|
|
80
|
+
-pkcs12 "#{Pkg::Config.msi_signing_cert}" \
|
|
81
|
+
-pass "#{Pkg::Config.msi_signing_cert_pw}" \
|
|
82
|
+
-ts "http://sha256timestamp.ws.symantec.com/sha256/timestamp" \
|
|
83
|
+
-in "C:/#{work_dir}/signed-$msi" \
|
|
84
|
+
-out "C:/#{work_dir}/$msi"
|
|
85
|
+
rm "C:/#{work_dir}/signed-$msi" ;
|
|
86
|
+
fi
|
|
83
87
|
done))
|
|
84
88
|
msis.each do | msi |
|
|
85
89
|
Pkg::Util::Net.rsync_from("/cygdrive/c/#{work_dir}/#{File.basename(msi)}", rsync_host_string, File.dirname(msi))
|
|
@@ -36,7 +36,7 @@ describe 'Pkg::Platforms' do
|
|
|
36
36
|
|
|
37
37
|
describe '#codenames' do
|
|
38
38
|
it 'should return all codenames for a given platform' do
|
|
39
|
-
codenames = ['bionic', 'buster', 'cumulus', 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial']
|
|
39
|
+
codenames = ['bionic', 'buster', 'cosmic', 'cumulus', 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial']
|
|
40
40
|
expect(Pkg::Platforms.codenames).to match_array(codenames)
|
|
41
41
|
end
|
|
42
42
|
end
|
data/tasks/ship.rake
CHANGED
|
@@ -283,7 +283,6 @@ namespace :pl do
|
|
|
283
283
|
puts "Do you want to start shipping the rubygem '#{gem_file}'?"
|
|
284
284
|
next unless Pkg::Util.ask_yes_or_no
|
|
285
285
|
Rake::Task['pl:ship_gem_to_rubygems'].execute(file: gem_file)
|
|
286
|
-
Rake::Task['pl:ship_gem_to_internal_mirror'].execute(file: gem_file)
|
|
287
286
|
end
|
|
288
287
|
|
|
289
288
|
Rake::Task['pl:ship_gem_to_downloads'].invoke
|
|
@@ -293,6 +292,22 @@ namespace :pl do
|
|
|
293
292
|
end
|
|
294
293
|
end
|
|
295
294
|
|
|
295
|
+
desc 'Ship built gem to internal Gem mirror and public nightlies file server'
|
|
296
|
+
task ship_nightly_gem: 'pl:fetch' do
|
|
297
|
+
# We want to ship a Gem only for projects that build gems, so
|
|
298
|
+
# all of the Gem shipping tasks are wrapped in an `if`.
|
|
299
|
+
if Pkg::Config.build_gem
|
|
300
|
+
fail 'Value `Pkg::Config.gem_host` not defined, skipping nightly ship' unless Pkg::Config.gem_host
|
|
301
|
+
fail 'Value `Pkg::Config.nonfinal_gem_path` not defined, skipping nightly ship' unless Pkg::Config.nonfinal_gem_path
|
|
302
|
+
FileList['pkg/*.gem'].each do |gem_file|
|
|
303
|
+
Pkg::Gem.ship_to_internal_mirror(gem_file)
|
|
304
|
+
end
|
|
305
|
+
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
306
|
+
Pkg::Util::Ship.ship_gem('pkg', Pkg::Config.nonfinal_gem_path, platform_independent: true)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
|
|
296
311
|
desc 'Ship built gem to rubygems.org'
|
|
297
312
|
task :ship_gem_to_rubygems, [:file] => 'pl:fetch' do |_t, args|
|
|
298
313
|
puts "Do you want to ship #{args[:file]} to rubygems.org?"
|
|
@@ -304,13 +319,6 @@ namespace :pl do
|
|
|
304
319
|
end
|
|
305
320
|
end
|
|
306
321
|
|
|
307
|
-
desc "Ship built gems to internal Gem server (#{Pkg::Config.internal_gem_host})"
|
|
308
|
-
task :ship_gem_to_internal_mirror, [:file] => 'pl:fetch' do |_t, args|
|
|
309
|
-
unless Pkg::Config.internal_gem_host
|
|
310
|
-
warn 'Value `Pkg::Config.internal_gem_host` not defined; skipping internal ship'
|
|
311
|
-
end
|
|
312
|
-
end
|
|
313
|
-
|
|
314
322
|
desc "Ship built gems to public Downloads server (#{Pkg::Config.gem_host})"
|
|
315
323
|
task :ship_gem_to_downloads => 'pl:fetch' do
|
|
316
324
|
unless Pkg::Config.gem_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.99.
|
|
4
|
+
version: 0.99.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet Labs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|