packaging 0.99.61 → 0.99.66

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.
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe 'Pkg::Platforms' do
4
4
  describe '#by_package_format' do
5
5
  it 'should return an array of platforms that use a given format' do
6
- deb_platforms = ['cumulus', 'debian', 'ubuntu']
6
+ deb_platforms = ['debian', 'ubuntu']
7
7
  rpm_platforms = ['aix', 'cisco-wrlinux', 'el', 'fedora', 'redhatfips', 'sles']
8
8
  expect(Pkg::Platforms.by_package_format('deb')).to match_array(deb_platforms)
9
9
  expect(Pkg::Platforms.by_package_format('rpm')).to match_array(rpm_platforms)
@@ -19,7 +19,7 @@ describe 'Pkg::Platforms' do
19
19
 
20
20
  describe '#supported_platforms' do
21
21
  it 'should return all supported platforms' do
22
- platforms = ['aix', 'cisco-wrlinux', 'cumulus', 'debian', 'el', 'eos', 'fedora', 'osx', 'redhatfips', 'sles', 'solaris', 'ubuntu', 'windows', 'windowsfips']
22
+ platforms = ['aix', 'cisco-wrlinux', 'debian', 'el', 'eos', 'fedora', 'osx', 'redhatfips', 'sles', 'solaris', 'ubuntu', 'windows', 'windowsfips']
23
23
  expect(Pkg::Platforms.supported_platforms).to match_array(platforms)
24
24
  end
25
25
  end
@@ -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 = ['focal', 'bionic', 'buster', 'cosmic', 'cumulus', 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial']
39
+ codenames = ['focal', 'bionic', 'buster', 'cosmic', 'jessie', 'stretch', 'trusty', 'xenial']
40
40
  expect(Pkg::Platforms.codenames).to match_array(codenames)
41
41
  end
42
42
  end
@@ -59,27 +59,27 @@ describe 'Pkg::Platforms' do
59
59
 
60
60
  describe '#arches_for_codename' do
61
61
  it 'should return an array of arches corresponding to a given codename' do
62
- expect(Pkg::Platforms.arches_for_codename('trusty')).to match_array(['i386', 'amd64'])
62
+ expect(Pkg::Platforms.arches_for_codename('xenial')).to match_array(['amd64', 'i386', 'ppc64el'])
63
63
  end
64
64
 
65
65
  it 'should be able to include source archietectures' do
66
- expect(Pkg::Platforms.arches_for_codename('trusty', true)).to match_array(['i386', 'amd64', 'source'])
66
+ expect(Pkg::Platforms.arches_for_codename('xenial', true)).to match_array(["amd64", "i386", "ppc64el", "source"])
67
67
  end
68
68
  end
69
69
 
70
70
  describe '#codename_to_tags' do
71
71
  it 'should return an array of platform tags corresponding to a given codename' do
72
- expect(Pkg::Platforms.codename_to_tags('trusty')).to match_array(['ubuntu-14.04-i386', 'ubuntu-14.04-amd64'])
72
+ expect(Pkg::Platforms.codename_to_tags('xenial')).to match_array(['ubuntu-16.04-i386', 'ubuntu-16.04-amd64', "ubuntu-16.04-ppc64el"])
73
73
  end
74
74
  end
75
75
 
76
76
  describe '#arches_for_platform_version' do
77
77
  it 'should return an array of arches for a given platform and version' do
78
- expect(Pkg::Platforms.arches_for_platform_version('sles', '11')).to match_array(['i386', 'x86_64', 's390x'])
78
+ expect(Pkg::Platforms.arches_for_platform_version('sles', '12')).to match_array(['x86_64', 'ppc64le'])
79
79
  end
80
80
 
81
81
  it 'should be able to include source architectures' do
82
- expect(Pkg::Platforms.arches_for_platform_version('sles', '11', true)).to match_array(['i386', 'x86_64', 's390x', 'SRPMS'])
82
+ expect(Pkg::Platforms.arches_for_platform_version('sles', '12', true)).to match_array(["SRPMS", "ppc64le", "x86_64"])
83
83
  end
84
84
  end
85
85
 
@@ -98,12 +98,12 @@ describe 'Pkg::Platforms' do
98
98
 
99
99
  describe '#platform_lookup' do
100
100
  it 'should return a hash of platform info' do
101
- expect(Pkg::Platforms.platform_lookup('osx-10.10-x86_64')).to be_instance_of(Hash)
101
+ expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64')).to be_instance_of(Hash)
102
102
  end
103
103
 
104
104
  it 'should include at least arch and package format keys' do
105
- expect(Pkg::Platforms.platform_lookup('osx-10.10-x86_64').keys).to include(:architectures)
106
- expect(Pkg::Platforms.platform_lookup('osx-10.10-x86_64').keys).to include(:package_format)
105
+ expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64').keys).to include(:architectures)
106
+ expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64').keys).to include(:package_format)
107
107
  end
108
108
  end
109
109
 
@@ -137,7 +137,7 @@ describe 'Pkg::Platforms' do
137
137
  'windows-2012' => ['windows', '2012', ''],
138
138
  'redhatfips-7-x86_64' => ['redhatfips', '7', 'x86_64'],
139
139
  'el-7-SRPMS' => ['el', '7', 'SRPMS'],
140
- 'ubuntu-14.04-source' => ['ubuntu', '14.04', 'source'],
140
+ 'ubuntu-16.04-source' => ['ubuntu', '16.04', 'source'],
141
141
  }
142
142
 
143
143
  fail_cases = [
@@ -12,7 +12,7 @@ describe 'Pkg::Retrieve' do
12
12
  'aix-6.1-power' => {:artifact => './aix/6.1/PC1/ppc/puppet-agent-5.3.2.155.gb25e649-1.aix6.1.ppc.rpm'},
13
13
  'el-7-x86_64' => {:artifact => './el/7/PC1/x86_64/puppet-agent-5.3.2.155.gb25e649-1.el7.x86_64.rpm'},
14
14
  'osx-10.11-x86_64' => {:artifact => './apple/10.11/PC1/x86_64/puppet-agent-5.3.2.155.gb25e649-1.osx10.11.dmg'},
15
- 'sles-11-s390x' => {:artifact => './sles/11/PC1/s390x/puppet-agent-5.3.2.155.gb25e649-1.sles11.s390x.rpm'},
15
+ 'sles-11-i386' => {:artifact => './sles/11/PC1/i386/puppet-agent-5.3.2.155.gb25e649-1.sles11.i386.rpm'},
16
16
  'solaris-10-sparc' => {:artifact => './solaris/10/PC1/puppet-agent-5.3.2.155.gb25e649-1.sparc.pkg.gz'},
17
17
  'ubuntu-16.04-amd64' => {:artifact => './deb/xenial/PC1/puppet-agent_5.3.2.155.gb25e649-1xenial_amd64.deb'},
18
18
  'windows-2012-x64' => {:artifact => './windows/puppet-agent-x64.msi'},
@@ -74,7 +74,6 @@ DOC
74
74
  ] }
75
75
  let(:v4_rpms) { [
76
76
  "#{rpm_directory}/el/7/PC1/aarch64/puppet-agent-5.5.3-1.el7.aarch64.rpm",
77
- "#{rpm_directory}/sles/12/PC1/s390x/puppet-agent-5.5.3-1.sles12.s390x.rpm",
78
77
  ] }
79
78
  let(:rpms) { rpms_not_to_sign + v3_rpms + v4_rpms }
80
79
  let(:already_signed_rpms) { [
@@ -43,25 +43,21 @@ describe '#Pkg::Util::Ship' do
43
43
  end
44
44
 
45
45
  local_pkgs = [
46
- 'pkg/deb/cumulus/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1cumulus_amd64.deb',
47
- 'pkg/deb/wheezy/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1wheezy_i386.deb',
46
+ 'pkg/deb/stretch/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1stretch_i386.deb',
48
47
  'pkg/el/5/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.el5.x86_64.rpm',
49
48
  'pkg/sles/11/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.sles11.i386.rpm',
50
49
  'pkg/sles/12/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.sles12.x86_64.rpm',
51
50
  'pkg/mac/10.15/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.15.dmg',
52
- 'pkg/mac/10.10/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.10.dmg',
53
51
  'pkg/eos/4/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix',
54
52
  'pkg/eos/4/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
55
53
  'pkg/windows/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x86.msi',
56
54
  ]
57
55
  new_pkgs = [
58
- 'pkg/cumulus/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1cumulus_amd64.deb',
59
- 'pkg/wheezy/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1wheezy_i386.deb',
56
+ 'pkg/stretch/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1stretch_i386.deb',
60
57
  'pkg/puppet5/el/5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.el5.x86_64.rpm',
61
58
  'pkg/puppet5/sles/11/i386/puppet-agent-1.4.1.2904.g8023dd1-1.sles11.i386.rpm',
62
59
  'pkg/puppet5/sles/12/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.sles12.x86_64.rpm',
63
60
  'pkg/mac/puppet5/10.15/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.15.dmg',
64
- 'pkg/mac/puppet5/10.10/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.10.dmg',
65
61
  'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix',
66
62
  'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
67
63
  'pkg/windows/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x86.msi',
@@ -368,46 +368,26 @@ namespace :pl do
368
368
 
369
369
  desc "ship apple dmg to #{Pkg::Config.dmg_staging_server}"
370
370
  task ship_dmg: 'pl:fetch' do
371
- # TODO: realistically, this shouldn't be here. This block needs to be
372
- # removed, but only when we can successfully modify all instances of
373
- # this to be set to '/opt/downloads'. In the meantime, we need to write
374
- # this terrible workaround to ensure backward compatibility.
375
- #
376
- # I'm so sorry
377
- # ~MAS 2017-08-14
378
- if Pkg::Config.dmg_path == "/opt/downloads/mac"
379
- path = "/opt/downloads"
380
- else
381
- path = Pkg::Config.dmg_path
382
- end
371
+ path = Pkg::Paths.remote_repo_base(package_format: 'dmg')
383
372
  Pkg::Util::Ship.ship_dmg('pkg', path)
384
373
  end
385
374
 
386
375
  desc "ship nightly apple dmgs to #{Pkg::Config.dmg_staging_server}"
387
376
  task ship_nightly_dmg: 'pl:fetch' do
388
- Pkg::Util::Ship.ship_dmg('pkg', Pkg::Config.nonfinal_dmg_path, nonfinal: true)
377
+ path = Pkg::Paths.remote_repo_base(package_format: 'dmg', nonfinal: true)
378
+ Pkg::Util::Ship.ship_dmg('pkg', path, nonfinal: true)
389
379
  end
390
380
 
391
381
  desc "ship Arista EOS swix packages and signatures to #{Pkg::Config.swix_staging_server}"
392
382
  task ship_swix: 'pl:fetch' do
393
- # TODO: realistically, this shouldn't be here. This block needs to be
394
- # removed, but only when we can successfully modify all instances of
395
- # this to be set to '/opt/downloads'. In the meantime, we need to write
396
- # this terrible workaround to ensure backward compatibility.
397
- #
398
- # I'm so sorry
399
- # ~MAS 2017-08-14
400
- if Pkg::Config.swix_path == "/opt/downloads/eos"
401
- path = "/opt/downloads"
402
- else
403
- path = Pkg::Config.swix_path
404
- end
383
+ path = Pkg::Paths.remote_repo_base(package_format: 'swix')
405
384
  Pkg::Util::Ship.ship_swix('pkg', path)
406
385
  end
407
386
 
408
387
  desc "ship nightly Arista EOS swix packages and signatures to #{Pkg::Config.swix_staging_server}"
409
388
  task ship_nightly_swix: 'pl:fetch' do
410
- Pkg::Util::Ship.ship_swix('pkg', Pkg::Config.nonfinal_swix_path, nonfinal: true)
389
+ path = Pkg::Paths.remote_repo_base(package_format: 'swix', nonfinal: true)
390
+ Pkg::Util::Ship.ship_swix('pkg', path, nonfinal: true)
411
391
  end
412
392
 
413
393
  desc "ship tarball and signature to #{Pkg::Config.tar_staging_server}"
@@ -429,24 +409,14 @@ namespace :pl do
429
409
 
430
410
  desc "Ship MSI packages to #{Pkg::Config.msi_staging_server}"
431
411
  task ship_msi: 'pl:fetch' do
432
- # TODO: realistically, this shouldn't be here. This block needs to be
433
- # removed, but only when we can successfully modify all instances of
434
- # this to be set to '/opt/downloads'. In the meantime, we need to write
435
- # this terrible workaround to ensure backward compatibility.
436
- #
437
- # I'm so sorry
438
- # ~MAS 2017-08-14
439
- if Pkg::Config.msi_path == "/opt/downloads/windows"
440
- path = "/opt/downloads"
441
- else
442
- path = Pkg::Config.msi_path
443
- end
412
+ path = Pkg::Paths.remote_repo_base(package_format: 'msi')
444
413
  Pkg::Util::Ship.ship_msi('pkg', path, excludes: ["#{Pkg::Config.project}-x(86|64).msi"])
445
414
  end
446
415
 
447
416
  desc "Ship nightly MSI packages to #{Pkg::Config.msi_staging_server}"
448
417
  task ship_nightly_msi: 'pl:fetch' do
449
- Pkg::Util::Ship.ship_msi('pkg', Pkg::Config.nonfinal_msi_path, excludes: ["#{Pkg::Config.project}-x(86|64).msi"], nonfinal: true)
418
+ path = Pkg::Paths.remote_repo_base(package_format: 'msi', nonfinal: true)
419
+ Pkg::Util::Ship.ship_msi('pkg', path, excludes: ["#{Pkg::Config.project}-x(86|64).msi"], nonfinal: true)
450
420
  end
451
421
 
452
422
  desc "Add #{Pkg::Config.project} version #{Pkg::Config.ref} to release-metrics"
@@ -546,6 +516,16 @@ namespace :pl do
546
516
  puts " * #{err}"
547
517
  end
548
518
  end
519
+
520
+ desc 'Create the rolling repo links'
521
+ task create_repo_links: 'pl:fetch' do
522
+ Pkg::Util::Ship.create_rolling_repo_links
523
+ end
524
+
525
+ desc 'Create rolling repo links for nightlies'
526
+ task create_nightly_repo_links: 'pl:fetch' do
527
+ Pkg::Util::Ship.create_rolling_repo_links(true)
528
+ end
549
529
  end
550
530
 
551
531
  # It is odd to namespace this ship task under :jenkins, but this task is
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.61
4
+ version: 0.99.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-02 00:00:00.000000000 Z
11
+ date: 2020-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -107,6 +107,7 @@ files:
107
107
  - lib/packaging.rb
108
108
  - lib/packaging/archive.rb
109
109
  - lib/packaging/artifactory.rb
110
+ - lib/packaging/artifactory/extensions.rb
110
111
  - lib/packaging/config.rb
111
112
  - lib/packaging/config/params.rb
112
113
  - lib/packaging/deb.rb
@@ -244,28 +245,28 @@ signing_key:
244
245
  specification_version: 4
245
246
  summary: Puppet Labs' packaging automation
246
247
  test_files:
247
- - spec/lib/packaging_spec.rb
248
- - spec/lib/packaging/config_spec.rb
249
- - spec/lib/packaging/retrieve_spec.rb
248
+ - spec/lib/packaging/sign_spec.rb
249
+ - spec/lib/packaging/paths_spec.rb
250
250
  - spec/lib/packaging/repo_spec.rb
251
- - spec/lib/packaging/tar_spec.rb
252
- - spec/lib/packaging/rpm/repo_spec.rb
253
251
  - spec/lib/packaging/deb_spec.rb
254
- - spec/lib/packaging/sign_spec.rb
255
252
  - spec/lib/packaging/deb/repo_spec.rb
256
- - spec/lib/packaging/util/net_spec.rb
257
- - spec/lib/packaging/util/ship_spec.rb
258
- - spec/lib/packaging/util/gpg_spec.rb
259
- - spec/lib/packaging/util/file_spec.rb
253
+ - spec/lib/packaging/gem_spec.rb
254
+ - spec/lib/packaging/artifactory_spec.rb
255
+ - spec/lib/packaging/tar_spec.rb
256
+ - spec/lib/packaging/util/version_spec.rb
257
+ - spec/lib/packaging/util/execution_spec.rb
260
258
  - spec/lib/packaging/util/os_spec.rb
259
+ - spec/lib/packaging/util/ship_spec.rb
261
260
  - spec/lib/packaging/util/git_spec.rb
262
- - spec/lib/packaging/util/git_tag_spec.rb
263
261
  - spec/lib/packaging/util/rake_utils_spec.rb
262
+ - spec/lib/packaging/util/net_spec.rb
263
+ - spec/lib/packaging/util/file_spec.rb
264
264
  - spec/lib/packaging/util/jenkins_spec.rb
265
- - spec/lib/packaging/util/execution_spec.rb
266
- - spec/lib/packaging/util/version_spec.rb
267
265
  - spec/lib/packaging/util/misc_spec.rb
266
+ - spec/lib/packaging/util/git_tag_spec.rb
267
+ - spec/lib/packaging/util/gpg_spec.rb
268
+ - spec/lib/packaging/rpm/repo_spec.rb
269
+ - spec/lib/packaging/retrieve_spec.rb
268
270
  - spec/lib/packaging/platforms_spec.rb
269
- - spec/lib/packaging/gem_spec.rb
270
- - spec/lib/packaging/paths_spec.rb
271
- - spec/lib/packaging/artifactory_spec.rb
271
+ - spec/lib/packaging/config_spec.rb
272
+ - spec/lib/packaging_spec.rb