packaging 0.99.14 → 0.99.15

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
  SHA1:
3
- metadata.gz: 6d531163c04b1c58685d689cbe17fed75a16a949
4
- data.tar.gz: 48b0be1ef8d71c9c8f1651efb05ee0bed87eeb47
3
+ metadata.gz: ca6653015d4e31dbea9cfa4b0136806f5e69c20a
4
+ data.tar.gz: 14e5a1a07951e3ab6dec659999b2e834849ef12e
5
5
  SHA512:
6
- metadata.gz: 7c5e87803ae9837081ea3a4132b406b5388d12117647203d1c4c58163d35db0dc7bd785d1cac7dd5b36e360a3196bec956145b3f6ea875d151ed192c94aa0564
7
- data.tar.gz: 4af015434724b5f1cbe6924d2140d0dd58511894ec44225c3fdfdc049de85e2ce62470f00bf0c67f381151ecd2cdbb9169256c93c97935a6bcf192bd19696a06
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 "dyamic jenkins task workflow" below)
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 hierarcical data'
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
- Pkg::Util::Execution.capture3("gem push #{file}")
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
@@ -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' => {
@@ -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/bin/productsign --keychain "#{Pkg::Config.osx_signing_keychain}" --sign "#{Pkg::Config.osx_signing_cert}" #{mount}/$pkg #{signed}/$pkg ;
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 ;
@@ -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" sign \
67
- -n "Puppet" -i "http://www.puppet.com" \
68
- -h sha1 \
69
- -pkcs12 "#{Pkg::Config.msi_signing_cert}" \
70
- -pass "#{Pkg::Config.msi_signing_cert_pw}" \
71
- -t "http://timestamp.verisign.com/scripts/timstamp.dll" \
72
- -in "C:/#{work_dir}/$msi" \
73
- -out "C:/#{work_dir}/signed-$msi"
74
- "/cygdrive/c/tools/osslsigncode-fork/osslsigncode.exe" sign \
75
- -n "Puppet" -i "http://www.puppet.com" \
76
- -nest -h sha256 \
77
- -pkcs12 "#{Pkg::Config.msi_signing_cert}" \
78
- -pass "#{Pkg::Config.msi_signing_cert_pw}" \
79
- -ts "http://sha256timestamp.ws.symantec.com/sha256/timestamp" \
80
- -in "C:/#{work_dir}/signed-$msi" \
81
- -out "C:/#{work_dir}/$msi"
82
- rm "C:/#{work_dir}/signed-$msi"
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))
@@ -80,6 +80,7 @@ describe "Pkg::Config" do
80
80
  :nonfinal_apt_repo_path,
81
81
  :nonfinal_apt_repo_staging_path,
82
82
  :nonfinal_dmg_path,
83
+ :nonfinal_gem_path,
83
84
  :nonfinal_ips_path,
84
85
  :nonfinal_msi_path,
85
86
  :nonfinal_p5p_path,
@@ -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.14
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-09-26 00:00:00.000000000 Z
11
+ date: 2018-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec