packaging 0.107.2 → 0.108.0
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/platforms.rb +0 -40
- data/spec/lib/packaging/artifactory_spec.rb +9 -9
- data/spec/lib/packaging/config_spec.rb +21 -21
- data/spec/lib/packaging/deb/repo_spec.rb +3 -3
- data/spec/lib/packaging/paths_spec.rb +13 -13
- data/spec/lib/packaging/platforms_spec.rb +10 -14
- data/spec/lib/packaging/util/ship_spec.rb +2 -2
- data/tasks/ship.rake +15 -30
- metadata +18 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9056fb1ae6e0953566e9c8fb0f6e287b714386ed41da231511bd319d5bded84
|
|
4
|
+
data.tar.gz: 21878b9102e278b19c10392b8d171c88bdf344b0727525680462b45820569c6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1555def74288b4d4de70211ddfcf2b804875fa1736735a1130a1a69274265c5079bcc92edad3f37a805d5510bd03f2e314cbff6b84f4c8a66cfbba9d04f0e715
|
|
7
|
+
data.tar.gz: 7c57682a4c8ff21555dcfe2643110221a4095a0c09991333c100d8194f06a641b517ff6f7ca915388f151f63422a0d33d9d1286a5f38c6f5fb98e11f507d8562
|
data/lib/packaging/platforms.rb
CHANGED
|
@@ -21,14 +21,6 @@ module Pkg
|
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
'debian' => {
|
|
24
|
-
'9' => {
|
|
25
|
-
codename: 'stretch',
|
|
26
|
-
architectures: ['amd64', 'i386'],
|
|
27
|
-
source_architecture: 'source',
|
|
28
|
-
package_format: 'deb',
|
|
29
|
-
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
|
30
|
-
repo: true,
|
|
31
|
-
},
|
|
32
24
|
'10' => {
|
|
33
25
|
codename: 'buster',
|
|
34
26
|
architectures: ['amd64', 'i386'],
|
|
@@ -83,22 +75,6 @@ module Pkg
|
|
|
83
75
|
},
|
|
84
76
|
|
|
85
77
|
'fedora' => {
|
|
86
|
-
'32' => {
|
|
87
|
-
architectures: ['x86_64'],
|
|
88
|
-
source_architecture: 'SRPMS',
|
|
89
|
-
package_format: 'rpm',
|
|
90
|
-
source_package_formats: ['src.rpm'],
|
|
91
|
-
signature_format: 'v4',
|
|
92
|
-
repo: true,
|
|
93
|
-
},
|
|
94
|
-
'34' => {
|
|
95
|
-
architectures: ['x86_64'],
|
|
96
|
-
source_architecture: 'SRPMS',
|
|
97
|
-
package_format: 'rpm',
|
|
98
|
-
source_package_formats: ['src.rpm'],
|
|
99
|
-
signature_format: 'v4',
|
|
100
|
-
repo: true,
|
|
101
|
-
},
|
|
102
78
|
'36' => {
|
|
103
79
|
architectures: ['x86_64'],
|
|
104
80
|
source_architecture: 'SRPMS',
|
|
@@ -187,22 +163,6 @@ module Pkg
|
|
|
187
163
|
},
|
|
188
164
|
|
|
189
165
|
'ubuntu' => {
|
|
190
|
-
'14.04' => {
|
|
191
|
-
codename: 'trusty',
|
|
192
|
-
architectures: ['amd64', 'i386'],
|
|
193
|
-
source_architecture: 'source',
|
|
194
|
-
package_format: 'deb',
|
|
195
|
-
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
|
196
|
-
repo: true,
|
|
197
|
-
},
|
|
198
|
-
'16.04' => {
|
|
199
|
-
codename: 'xenial',
|
|
200
|
-
architectures: ['amd64', 'i386', 'ppc64el'],
|
|
201
|
-
source_architecture: 'source',
|
|
202
|
-
package_format: 'deb',
|
|
203
|
-
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
|
204
|
-
repo: true,
|
|
205
|
-
},
|
|
206
166
|
'18.04' => {
|
|
207
167
|
codename: 'bionic',
|
|
208
168
|
architectures: ['amd64', 'ppc64el', 'aarch64'],
|
|
@@ -16,10 +16,10 @@ describe 'artifactory.rb' do
|
|
|
16
16
|
:repo_config => "../repo_configs/rpm/pl-puppet-agent-f65f9efbb727c3d2d72d6799c0fc345a726f27b5-el-6-x86_64.repo",
|
|
17
17
|
:additional_artifacts => ["./el/6/PC1/x86_64/puppet-agent-extras-5.3.1.34.gf65f9ef-1.el6.x86_64.rpm"],
|
|
18
18
|
},
|
|
19
|
-
'ubuntu-
|
|
20
|
-
:artifact => "./deb/
|
|
21
|
-
:repo_config => "../repo_configs/deb/pl-puppet-agent-f65f9efbb727c3d2d72d6799c0fc345a726f27b5-
|
|
22
|
-
:additional_artifacts => ["./deb/
|
|
19
|
+
'ubuntu-18.04-amd64' => {
|
|
20
|
+
:artifact => "./deb/bionic/PC1/puppet-agent_5.3.1.34.gf65f9ef-1bionic_amd64.deb",
|
|
21
|
+
:repo_config => "../repo_configs/deb/pl-puppet-agent-f65f9efbb727c3d2d72d6799c0fc345a726f27b5-bionic.list",
|
|
22
|
+
:additional_artifacts => ["./deb/bionic/PC1/puppet-agent-extras_5.3.1.34.gf65f9ef-1bionic_amd64.deb"],
|
|
23
23
|
},
|
|
24
24
|
'debian-10-amd64' => {
|
|
25
25
|
:artifact => "./deb/buster/PC1/puppetdb_5.3.1.34.gf65f9ef-1buster_all.deb",
|
|
@@ -61,13 +61,13 @@ describe 'artifactory.rb' do
|
|
|
61
61
|
:package_name => 'path/to/a/el/6/package/puppet-agent-5.3.1.34.gf65f9ef-1.el6.x86_64.rpm',
|
|
62
62
|
:all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.el6.x86_64.rpm', 'puppet-agent-extras-5.3.1.34.gf65f9ef-1.el6.x86_64.rpm']
|
|
63
63
|
},
|
|
64
|
-
'ubuntu-
|
|
64
|
+
'ubuntu-18.04-amd64' => {
|
|
65
65
|
:toplevel_repo => 'debian__local',
|
|
66
|
-
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/ubuntu-
|
|
67
|
-
:codename => '
|
|
66
|
+
:repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/ubuntu-18.04",
|
|
67
|
+
:codename => 'bionic',
|
|
68
68
|
:arch => 'amd64',
|
|
69
|
-
:package_name => 'path/to/a/
|
|
70
|
-
:all_package_names => ['puppet-agent_5.3.1.34.gf65f9ef-
|
|
69
|
+
:package_name => 'path/to/a/bionic/package/puppet-agent_5.3.1.34.gf65f9ef-1bionic_amd64.deb',
|
|
70
|
+
:all_package_names => ['puppet-agent_5.3.1.34.gf65f9ef-1bionic_amd64.deb', 'puppet-agent-extras_5.3.1.34.gf65f9ef-1bionic_amd64.deb']
|
|
71
71
|
},
|
|
72
72
|
'debian-10-amd64' => {
|
|
73
73
|
:toplevel_repo => 'debian__local',
|
|
@@ -205,7 +205,7 @@ describe "Pkg::Config" do
|
|
|
205
205
|
platform_tags = [
|
|
206
206
|
'osx-10.15-x86_64',
|
|
207
207
|
'osx-11-x86_64',
|
|
208
|
-
'ubuntu-
|
|
208
|
+
'ubuntu-18.04-amd64',
|
|
209
209
|
'el-6-x86_64',
|
|
210
210
|
'el-7-ppc64le',
|
|
211
211
|
'sles-12-x86_64',
|
|
@@ -214,7 +214,7 @@ describe "Pkg::Config" do
|
|
|
214
214
|
artifacts = \
|
|
215
215
|
"./artifacts/apple/10.15/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.osx10.15.dmg\n" \
|
|
216
216
|
"./artifacts/apple/11/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.osx11.dmg\n" \
|
|
217
|
-
"./artifacts/deb/
|
|
217
|
+
"./artifacts/deb/bionic/PC1/puppet-agent_5.3.2-1bionic_amd64.deb\n" \
|
|
218
218
|
"./artifacts/el/6/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.el6.x86_64.rpm\n" \
|
|
219
219
|
"./artifacts/el/7/PC1/ppc64le/puppet-agent-5.3.2-1.el7.ppc64le.rpm\n" \
|
|
220
220
|
"./artifacts/sles/12/PC1/x86_64/puppet-agent-5.3.2-1.sles12.x86_64.rpm"
|
|
@@ -223,7 +223,7 @@ describe "Pkg::Config" do
|
|
|
223
223
|
"./artifacts/aix/7.1/PC1/ppc/puppet-agent-5.3.2-1.aix7.1.ppc.rpm"
|
|
224
224
|
|
|
225
225
|
fedora_artifacts = \
|
|
226
|
-
"./artifacts/fedora/
|
|
226
|
+
"./artifacts/fedora/36/PC1/x86_64/puppet-agent-5.3.2-1.fc36.x86_64.rpm"
|
|
227
227
|
|
|
228
228
|
windows_artifacts = \
|
|
229
229
|
"./artifacts/windows/puppet-agent-x64.msi\n" \
|
|
@@ -237,17 +237,17 @@ describe "Pkg::Config" do
|
|
|
237
237
|
"./artifacts/solaris/11/PC1/puppet-agent@5.3.2,5.11-1.sparc.p5p\n" \
|
|
238
238
|
"./artifacts/solaris/10/PC1/puppet-agent-5.3.2-1.i386.pkg.gz"
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
"./artifacts/deb/
|
|
242
|
-
"./artifacts/deb/
|
|
243
|
-
"./artifacts/deb/
|
|
244
|
-
"./artifacts/deb/
|
|
240
|
+
buster_artifacts = \
|
|
241
|
+
"./artifacts/deb/buster/PC1/puppet-agent-dbgsym_5.3.2-1buster_i386.deb\n" \
|
|
242
|
+
"./artifacts/deb/buster/PC1/puppet-agent_5.3.2-1buster_i386.deb\n" \
|
|
243
|
+
"./artifacts/deb/buster/PC1/puppet-agent_5.3.2.658.gc79ef9a-1buster_amd64.deb\n" \
|
|
244
|
+
"./artifacts/deb/buster/PC1/puppet-agent-dbgsym_5.3.2.658.gc79ef9a-1buster_amd64.deb"
|
|
245
245
|
|
|
246
246
|
artifacts_not_matching_project = \
|
|
247
|
-
"./artifacts/deb/
|
|
248
|
-
"./artifacts/deb/
|
|
249
|
-
"./artifacts/deb/
|
|
250
|
-
"./artifacts/deb/
|
|
247
|
+
"./artifacts/deb/bionic/pe-postgresql-contrib_2019.1.9.6.12-1bionic_amd64.deb\n" \
|
|
248
|
+
"./artifacts/deb/bionic/pe-postgresql-devel_2019.1.9.6.12-1bionic_amd64.deb\n" \
|
|
249
|
+
"./artifacts/deb/bionic/pe-postgresql-server_2019.1.9.6.12-1bionic_amd64.deb\n" \
|
|
250
|
+
"./artifacts/deb/bionic/pe-postgresql_2019.1.9.6.12-1bionic_amd64.deb"
|
|
251
251
|
project = 'puppet-agent'
|
|
252
252
|
ref = '5.3.2'
|
|
253
253
|
|
|
@@ -280,8 +280,8 @@ describe "Pkg::Config" do
|
|
|
280
280
|
it "should not use 'f' in fedora platform tags" do
|
|
281
281
|
allow(Pkg::Util::Net).to receive(:remote_execute).and_return(fedora_artifacts, nil)
|
|
282
282
|
data = Pkg::Config.platform_data
|
|
283
|
-
expect(data).to include('fedora-
|
|
284
|
-
expect(data).not_to include('fedora-
|
|
283
|
+
expect(data).to include('fedora-36-x86_64')
|
|
284
|
+
expect(data).not_to include('fedora-f36-x86_64')
|
|
285
285
|
end
|
|
286
286
|
|
|
287
287
|
it "should collect packages whose extname differ from package_format" do
|
|
@@ -300,19 +300,19 @@ describe "Pkg::Config" do
|
|
|
300
300
|
end
|
|
301
301
|
|
|
302
302
|
it "should not collect debug packages" do
|
|
303
|
-
allow(Pkg::Util::Net).to receive(:remote_execute).and_return(
|
|
303
|
+
allow(Pkg::Util::Net).to receive(:remote_execute).and_return(buster_artifacts, nil)
|
|
304
304
|
data = Pkg::Config.platform_data
|
|
305
|
-
expect(data['debian-
|
|
305
|
+
expect(data['debian-10-amd64']).to include(:artifact => './deb/buster/PC1/puppet-agent_5.3.2.658.gc79ef9a-1buster_amd64.deb')
|
|
306
306
|
end
|
|
307
307
|
|
|
308
308
|
it "should collect packages that don't match the project name" do
|
|
309
309
|
allow(Pkg::Util::Net).to receive(:remote_execute).and_return(artifacts_not_matching_project, nil)
|
|
310
310
|
data = Pkg::Config.platform_data
|
|
311
|
-
expect(data['ubuntu-
|
|
312
|
-
expect(data['ubuntu-
|
|
313
|
-
expect(data['ubuntu-
|
|
314
|
-
expect(data['ubuntu-
|
|
315
|
-
expect(data['ubuntu-
|
|
311
|
+
expect(data['ubuntu-18.04-amd64']).to include(:artifact => './deb/bionic/pe-postgresql-contrib_2019.1.9.6.12-1bionic_amd64.deb')
|
|
312
|
+
expect(data['ubuntu-18.04-amd64'][:additional_artifacts].size).to eq(3)
|
|
313
|
+
expect(data['ubuntu-18.04-amd64'][:additional_artifacts]).to include('./deb/bionic/pe-postgresql-devel_2019.1.9.6.12-1bionic_amd64.deb')
|
|
314
|
+
expect(data['ubuntu-18.04-amd64'][:additional_artifacts]).to include('./deb/bionic/pe-postgresql-server_2019.1.9.6.12-1bionic_amd64.deb')
|
|
315
|
+
expect(data['ubuntu-18.04-amd64'][:additional_artifacts]).to include('./deb/bionic/pe-postgresql_2019.1.9.6.12-1bionic_amd64.deb')
|
|
316
316
|
end
|
|
317
317
|
|
|
318
318
|
it "should use 'ppc' instead of 'power' in aix paths" do
|
|
@@ -6,7 +6,7 @@ describe "Pkg::Deb::Repo" do
|
|
|
6
6
|
let(:project) { "deb_repos" }
|
|
7
7
|
let(:ref) { "1234abcd" }
|
|
8
8
|
let(:base_url) { "http://#{builds_server}/#{project}/#{ref}" }
|
|
9
|
-
let(:cows) { ["
|
|
9
|
+
let(:cows) { ["bionic", "focal", "buster", ""] }
|
|
10
10
|
let(:wget_results) { cows.map {|cow| "#{base_url}/repos/apt/#{cow}" }.join("\n") }
|
|
11
11
|
let(:wget_garbage) { "\n and an index\nhttp://somethingelse.com/robots" }
|
|
12
12
|
let(:repo_configs) { cows.reject {|cow| cow.empty?}.map {|dist| "pkg/repo_configs/deb/pl-#{project}-#{ref}-#{dist}.list" } }
|
|
@@ -72,7 +72,7 @@ describe "Pkg::Deb::Repo" do
|
|
|
72
72
|
|
|
73
73
|
describe "#repo_creation_command" do
|
|
74
74
|
let(:prefix) { "thing" }
|
|
75
|
-
let(:artifact_directory) { ["/a/b/c/
|
|
75
|
+
let(:artifact_directory) { ["/a/b/c/bionic"] }
|
|
76
76
|
|
|
77
77
|
it "returns a command to make repos" do
|
|
78
78
|
command = Pkg::Deb::Repo.repo_creation_command(prefix, artifact_directory)
|
|
@@ -85,7 +85,7 @@ describe "Pkg::Deb::Repo" do
|
|
|
85
85
|
describe "#create_repos" do
|
|
86
86
|
let(:command) { "/usr/bin/make some repos" }
|
|
87
87
|
let(:artifact_directory) { "/tmp/dir/thing" }
|
|
88
|
-
let(:pkg_directories) { ['place/to/deb/
|
|
88
|
+
let(:pkg_directories) { ['place/to/deb/bionic', 'other/deb/focal'] }
|
|
89
89
|
|
|
90
90
|
it "generates repo configs remotely and then ships them" do
|
|
91
91
|
File.stub(:join) {artifact_directory}
|
|
@@ -5,11 +5,11 @@ describe 'Pkg::Paths' do
|
|
|
5
5
|
arch_transformations = {
|
|
6
6
|
['pkg/el-8-x86_64/puppet-agent-6.9.0-1.el8.x86_64.rpm', 'el', '8'] => 'x86_64',
|
|
7
7
|
['pkg/el/8/puppet6/aarch64/puppet-agent-6.5.0.3094.g16b6fa6f-1.el8.aarch64.rpm', 'el', '8'] => 'aarch64',
|
|
8
|
-
['artifacts/fedora/
|
|
9
|
-
['pkg/ubuntu-
|
|
8
|
+
['artifacts/fedora/36/puppet6/x86_64/puppet-agent-6.9.0-1.fc32.x86_64.rpm', 'fedora', '36'] => 'x86_64',
|
|
9
|
+
['pkg/ubuntu-18.04-amd64/puppet-agent_4.99.0-1bionic_amd64.deb', 'ubuntu', '18.04'] => 'amd64',
|
|
10
10
|
['artifacts/deb/focal/puppet6/puppet-agent_6.5.0.3094.g16b6fa6f-1focal_arm64.deb', 'ubuntu', '20.04'] => 'aarch64',
|
|
11
11
|
|
|
12
|
-
['artifacts/ubuntu-
|
|
12
|
+
['artifacts/ubuntu-18.04-i386/puppetserver_5.0.1-0.1SNAPSHOT.2017.07.27T2346puppetlabs1.debian.tar.gz', 'ubuntu', '18.04'] => 'source',
|
|
13
13
|
['artifacts/el/6/PC1/SRPMS/puppetserver-5.0.1.master-0.1SNAPSHOT.2017.08.18T0951.el6.src.rpm', 'el', '6'] => 'SRPMS'
|
|
14
14
|
}
|
|
15
15
|
arch_transformations.each do |path_array, arch|
|
|
@@ -23,7 +23,7 @@ describe 'Pkg::Paths' do
|
|
|
23
23
|
describe '#tag_from_artifact_path' do
|
|
24
24
|
path_tranformations = {
|
|
25
25
|
'pkg/el-7-x86_64/puppet-agent-5.5.22-1.el8.x86_64.rpm' => 'el-7-x86_64',
|
|
26
|
-
'pkg/ubuntu-20.04-amd64/puppet-agent_5.5.22-
|
|
26
|
+
'pkg/ubuntu-20.04-amd64/puppet-agent_5.5.22-1bionic_amd64.deb' => 'ubuntu-20.04-amd64',
|
|
27
27
|
'pkg/windows/puppet-agent-5.5.22-x86.msi' => 'windows-2012-x86',
|
|
28
28
|
'artifacts/el/6/products/x86_64/pe-r10k-2.5.4.3-1.el6.x86_64.rpm' => 'el-6-x86_64',
|
|
29
29
|
'pkg/pe/rpm/el-6-i386/pe-puppetserver-2017.3.0.3-1.el6.noarch.rpm' => 'el-6-i386',
|
|
@@ -35,7 +35,7 @@ describe 'Pkg::Paths' do
|
|
|
35
35
|
'pkg/apple/11/puppet6/x86_64/puppet-agent-6.19.0-1.osx11.dmg' => 'osx-11-x86_64',
|
|
36
36
|
'pkg/windows/puppet-agent-1.9.0-x86.msi' => 'windows-2012-x86',
|
|
37
37
|
'pkg/pe/rpm/el-6-i386/pe-puppetserver-2017.3.0.3-1.el6.src.rpm' => 'el-6-SRPMS',
|
|
38
|
-
'pkg/pe/deb/
|
|
38
|
+
'pkg/pe/deb/bionic/pe-puppetserver_2017.3.0.3-1puppet1.orig.tar.gz' => 'ubuntu-18.04-source',
|
|
39
39
|
'pkg/puppet-agent-5.1.0.79.g782e03c.gem' => nil,
|
|
40
40
|
'pkg/puppet-agent-5.1.0.7.g782e03c.tar.gz' => nil,
|
|
41
41
|
}
|
|
@@ -276,11 +276,11 @@ describe 'Pkg::Paths' do
|
|
|
276
276
|
.to eq(fake_apt_repo_path)
|
|
277
277
|
end
|
|
278
278
|
it 'returns nonfinal_yum_repo_path for nonfinal rpms' do
|
|
279
|
-
expect(Pkg::Paths.remote_repo_base('fedora-
|
|
279
|
+
expect(Pkg::Paths.remote_repo_base('fedora-36-x86_64', nonfinal: true))
|
|
280
280
|
.to eq(fake_yum_nightly_repo_path)
|
|
281
281
|
end
|
|
282
282
|
it 'returns nonfinal_apt_repo_path for nonfinal debs' do
|
|
283
|
-
expect(Pkg::Paths.remote_repo_base('debian-
|
|
283
|
+
expect(Pkg::Paths.remote_repo_base('debian-10-amd64', nonfinal: true))
|
|
284
284
|
.to eq(fake_apt_nightly_repo_path)
|
|
285
285
|
end
|
|
286
286
|
it 'fails if neither tag nor package_format is provided' do
|
|
@@ -309,8 +309,8 @@ describe 'Pkg::Paths' do
|
|
|
309
309
|
allow(Pkg::Paths).to receive(:remote_repo_base).and_return('/opt/repository/apt')
|
|
310
310
|
expect(Pkg::Paths.apt_package_base_path('ubuntu-18.04-amd64', 'puppet6', 'puppet-agent'))
|
|
311
311
|
.to eq('/opt/repository/apt/pool/bionic/puppet6/p/puppet-agent')
|
|
312
|
-
expect(Pkg::Paths.apt_package_base_path('debian-
|
|
313
|
-
.to eq('/opt/repository/apt/pool/
|
|
312
|
+
expect(Pkg::Paths.apt_package_base_path('debian-10-amd64', 'puppet6', 'bolt-server'))
|
|
313
|
+
.to eq('/opt/repository/apt/pool/buster/puppet6/b/bolt-server')
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
end
|
|
@@ -364,16 +364,16 @@ describe 'Pkg::Paths' do
|
|
|
364
364
|
.to eq("#{yum_repo_path}/#{repo_name}-release-sles-12.noarch.rpm")
|
|
365
365
|
end
|
|
366
366
|
it 'returns the appropriate link path for deb release packages' do
|
|
367
|
-
expect(Pkg::Paths.release_package_link_path('ubuntu-
|
|
368
|
-
.to eq("#{apt_repo_path}/#{repo_name}-release-
|
|
367
|
+
expect(Pkg::Paths.release_package_link_path('ubuntu-18.04-amd64'))
|
|
368
|
+
.to eq("#{apt_repo_path}/#{repo_name}-release-bionic.deb")
|
|
369
369
|
end
|
|
370
370
|
it 'returns the appropriate link path for nonfinal rpm release packages' do
|
|
371
371
|
expect(Pkg::Paths.release_package_link_path('el-7-x86_64', true))
|
|
372
372
|
.to eq("#{nonfinal_yum_repo_path}/#{nonfinal_repo_name}-release-el-7.noarch.rpm")
|
|
373
373
|
end
|
|
374
374
|
it 'returns the appropriate link path for nonfinal deb release packages' do
|
|
375
|
-
expect(Pkg::Paths.release_package_link_path('debian-
|
|
376
|
-
.to eq("#{nonfinal_apt_repo_path}/#{nonfinal_repo_name}-release-
|
|
375
|
+
expect(Pkg::Paths.release_package_link_path('debian-10-amd64', true))
|
|
376
|
+
.to eq("#{nonfinal_apt_repo_path}/#{nonfinal_repo_name}-release-buster.deb")
|
|
377
377
|
end
|
|
378
378
|
it 'returns nil for package formats that do not have release packages' do
|
|
379
379
|
expect(Pkg::Paths.release_package_link_path('osx-10.15-x86_64')).to eq(nil)
|
|
@@ -36,16 +36,12 @@ 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', 'bullseye', 'buster', '
|
|
39
|
+
codenames = ['focal', 'bionic', 'bullseye', 'buster', 'jammy']
|
|
40
40
|
expect(Pkg::Platforms.codenames).to match_array(codenames)
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
describe '#codename_to_platform_version' do
|
|
45
|
-
it 'should return the platform and version corresponding to a given codename' do
|
|
46
|
-
expect(Pkg::Platforms.codename_to_platform_version('xenial')).to eq(['ubuntu', '16.04'])
|
|
47
|
-
end
|
|
48
|
-
|
|
49
45
|
it 'should return the platform and version corresponding to a given codename' do
|
|
50
46
|
expect(Pkg::Platforms.codename_to_platform_version('jammy')).to eq(['ubuntu', '22.04'])
|
|
51
47
|
end
|
|
@@ -62,18 +58,18 @@ describe 'Pkg::Platforms' do
|
|
|
62
58
|
end
|
|
63
59
|
|
|
64
60
|
describe '#arches_for_codename' do
|
|
65
|
-
it 'should return an array of
|
|
66
|
-
expect(Pkg::Platforms.arches_for_codename('
|
|
61
|
+
it 'should return an array of architectures corresponding to a given codename' do
|
|
62
|
+
expect(Pkg::Platforms.arches_for_codename('bionic')).to match_array(['amd64', 'aarch64', 'ppc64el'])
|
|
67
63
|
end
|
|
68
64
|
|
|
69
|
-
it 'should be able to include source
|
|
70
|
-
expect(Pkg::Platforms.arches_for_codename('
|
|
65
|
+
it 'should be able to include source architectures' do
|
|
66
|
+
expect(Pkg::Platforms.arches_for_codename('bionic', true)).to match_array(["amd64", "aarch64", "ppc64el", "source"])
|
|
71
67
|
end
|
|
72
68
|
end
|
|
73
69
|
|
|
74
70
|
describe '#codename_to_tags' do
|
|
75
71
|
it 'should return an array of platform tags corresponding to a given codename' do
|
|
76
|
-
expect(Pkg::Platforms.codename_to_tags('
|
|
72
|
+
expect(Pkg::Platforms.codename_to_tags('bionic')).to match_array(['ubuntu-18.04-aarch64', 'ubuntu-18.04-amd64', "ubuntu-18.04-ppc64el"])
|
|
77
73
|
end
|
|
78
74
|
end
|
|
79
75
|
|
|
@@ -131,17 +127,17 @@ describe 'Pkg::Platforms' do
|
|
|
131
127
|
|
|
132
128
|
describe '#parse_platform_tag' do
|
|
133
129
|
test_cases = {
|
|
134
|
-
'debian-
|
|
130
|
+
'debian-10-amd64' => ['debian', '10', 'amd64'],
|
|
135
131
|
'windows-2012-x86' => ['windows', '2012', 'x86'],
|
|
136
132
|
'windowsfips-2012-x64' => ['windowsfips', '2012', 'x64'],
|
|
137
133
|
'el-7-x86_64' => ['el', '7', 'x86_64'],
|
|
138
134
|
'el-6' => ['el', '6', ''],
|
|
139
|
-
'
|
|
140
|
-
'
|
|
135
|
+
'bionic-amd64' => ['ubuntu', '18.04', 'amd64'],
|
|
136
|
+
'bionic' => ['ubuntu', '18.04', ''],
|
|
141
137
|
'windows-2012' => ['windows', '2012', ''],
|
|
142
138
|
'redhatfips-7-x86_64' => ['redhatfips', '7', 'x86_64'],
|
|
143
139
|
'el-7-SRPMS' => ['el', '7', 'SRPMS'],
|
|
144
|
-
'ubuntu-
|
|
140
|
+
'ubuntu-18.04-source' => ['ubuntu', '18.04', 'source'],
|
|
145
141
|
}
|
|
146
142
|
|
|
147
143
|
fail_cases = [
|
|
@@ -52,7 +52,7 @@ describe '#Pkg::Util::Ship' do
|
|
|
52
52
|
pkg/sles/12/puppet6/x86_64/puppet-agent-6.19.0-1.sles12.x86_64.rpm
|
|
53
53
|
pkg/sles/15/puppet6/x86_64/puppet-agent-6.19.0-1.sles15.x86_64.rpm
|
|
54
54
|
pkg/apple/10.15/puppet6/x86_64/puppet-agent-6.19.0-1.osx10.15.dmg
|
|
55
|
-
pkg/fedora/
|
|
55
|
+
pkg/fedora/36/puppet6/x86_64/puppet-agent-6.19.0-1.fc32.x86_64.rpm
|
|
56
56
|
pkg/windows/puppet-agent-6.19.0-x64.msi
|
|
57
57
|
pkg/windows/puppet-agent-6.19.0-x86.msi
|
|
58
58
|
pkg/windowsfips/puppet-agent-6.19.0-x64.msi
|
|
@@ -71,7 +71,7 @@ describe '#Pkg::Util::Ship' do
|
|
|
71
71
|
pkg/puppet6/sles/12/x86_64/puppet-agent-6.19.0-1.sles12.x86_64.rpm
|
|
72
72
|
pkg/puppet6/sles/15/x86_64/puppet-agent-6.19.0-1.sles15.x86_64.rpm
|
|
73
73
|
pkg/mac/puppet6/10.15/x86_64/puppet-agent-6.19.0-1.osx10.15.dmg
|
|
74
|
-
pkg/puppet6/fedora/
|
|
74
|
+
pkg/puppet6/fedora/36/x86_64/puppet-agent-6.19.0-1.fc32.x86_64.rpm
|
|
75
75
|
pkg/windows/puppet6/puppet-agent-6.19.0-x64.msi
|
|
76
76
|
pkg/windows/puppet6/puppet-agent-6.19.0-x86.msi
|
|
77
77
|
pkg/windowsfips/puppet6/puppet-agent-6.19.0-x64.msi
|
data/tasks/ship.rake
CHANGED
|
@@ -239,73 +239,58 @@ namespace :pl do
|
|
|
239
239
|
end
|
|
240
240
|
|
|
241
241
|
##
|
|
242
|
-
## S3
|
|
242
|
+
## S3 syncing
|
|
243
243
|
S3_REPO_SYNC = 'sudo /usr/local/bin/s3_repo_sync.sh'
|
|
244
|
-
GCP_REPO_SYNC = '/usr/local/bin/gcp_repo_sync'
|
|
245
244
|
|
|
246
|
-
desc "Sync signed apt repos from #{Pkg::Config.apt_signing_server} to S3
|
|
245
|
+
desc "Sync signed apt repos from #{Pkg::Config.apt_signing_server} to S3"
|
|
247
246
|
task :deploy_apt_repo_to_s3 => 'pl:fetch' do
|
|
248
247
|
s3_sync_command = "#{S3_REPO_SYNC} apt.puppetlabs.com"
|
|
249
|
-
gcp_sync_command = "#{GCP_REPO_SYNC} apt.puppetlabs.com"
|
|
250
248
|
|
|
251
|
-
puts "Sync apt repos from #{Pkg::Config.apt_signing_server} to S3
|
|
249
|
+
puts "Sync apt repos from #{Pkg::Config.apt_signing_server} to S3? [y,n]"
|
|
252
250
|
next unless Pkg::Util.ask_yes_or_no
|
|
253
251
|
|
|
254
252
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
255
253
|
Pkg::Util::Net.remote_execute(Pkg::Config.apt_signing_server, s3_sync_command)
|
|
256
254
|
end
|
|
257
|
-
|
|
258
|
-
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
259
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.apt_signing_server, gcp_sync_command)
|
|
260
|
-
end
|
|
261
255
|
end
|
|
262
256
|
|
|
263
|
-
desc "Sync signed yum repos from #{Pkg::Config.yum_staging_server} to S3
|
|
257
|
+
desc "Sync signed yum repos from #{Pkg::Config.yum_staging_server} to S3"
|
|
264
258
|
task :deploy_yum_repo_to_s3 => 'pl:fetch' do
|
|
265
259
|
s3_sync_command = "#{S3_REPO_SYNC} yum.puppetlabs.com"
|
|
266
|
-
|
|
267
|
-
puts "Sync yum repos from #{Pkg::Config.yum_staging_server} to S3
|
|
260
|
+
|
|
261
|
+
puts "Sync yum repos from #{Pkg::Config.yum_staging_server} to S3? [y,n]"
|
|
268
262
|
next unless Pkg::Util.ask_yes_or_no
|
|
269
|
-
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
270
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.yum_staging_server, s3_sync_command)
|
|
271
|
-
end
|
|
272
263
|
|
|
273
264
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
274
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.yum_staging_server,
|
|
265
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.yum_staging_server, s3_sync_command)
|
|
275
266
|
end
|
|
276
267
|
end
|
|
277
268
|
|
|
278
|
-
desc "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to S3
|
|
269
|
+
desc "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to S3"
|
|
279
270
|
task :deploy_downloads_to_s3 => 'pl:fetch' do
|
|
280
271
|
s3_sync_command = "#{S3_REPO_SYNC} downloads.puppetlabs.com"
|
|
281
|
-
|
|
282
|
-
puts "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to S3
|
|
272
|
+
|
|
273
|
+
puts "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to S3? [y,n]"
|
|
283
274
|
next unless Pkg::Util.ask_yes_or_no
|
|
284
|
-
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
285
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, s3_sync_command)
|
|
286
|
-
end
|
|
287
275
|
|
|
288
276
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
289
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server,
|
|
277
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, s3_sync_command)
|
|
290
278
|
end
|
|
291
279
|
end
|
|
292
280
|
|
|
293
|
-
desc "Sync nightlies.puppet.com from #{Pkg::Config.staging_server} to S3
|
|
281
|
+
desc "Sync nightlies.puppet.com from #{Pkg::Config.staging_server} to S3"
|
|
294
282
|
task :deploy_nightlies_to_s3 => 'pl:fetch' do
|
|
295
283
|
s3_sync_command = "#{S3_REPO_SYNC} nightlies.puppet.com"
|
|
296
|
-
gcp_sync_command = "#{S3_REPO_SYNC} nightlies.puppet.com"
|
|
297
|
-
puts "Syncing nightly builds from #{Pkg::Config.staging_server} to S3 and GCP"
|
|
298
|
-
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
299
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, s3_sync_command)
|
|
300
|
-
end
|
|
301
284
|
|
|
285
|
+
puts "Syncing nightly builds from #{Pkg::Config.staging_server} to S3"
|
|
302
286
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
|
303
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server,
|
|
287
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, s3_sync_command)
|
|
304
288
|
end
|
|
305
289
|
end
|
|
306
290
|
|
|
307
291
|
desc "Sync signed apt repos from #{Pkg::Config.apt_signing_server} to Google Cloud Platform"
|
|
308
292
|
task :sync_apt_repo_to_gcp => 'pl:fetch' do
|
|
293
|
+
GCP_REPO_SYNC = '/usr/local/bin/gcp_repo_sync'
|
|
309
294
|
target_site = 'apt.repos.puppet.com'
|
|
310
295
|
sync_command_puppet_6 = "#{GCP_REPO_SYNC} #{target_site} puppet6"
|
|
311
296
|
sync_command_puppet_7 = "#{GCP_REPO_SYNC} #{target_site} puppet7"
|
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.
|
|
4
|
+
version: 0.108.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet Labs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-10-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|
|
@@ -323,28 +323,28 @@ signing_key:
|
|
|
323
323
|
specification_version: 4
|
|
324
324
|
summary: Puppet Labs' packaging automation
|
|
325
325
|
test_files:
|
|
326
|
-
- spec/lib/packaging/gem_spec.rb
|
|
327
326
|
- spec/lib/packaging/platforms_spec.rb
|
|
328
327
|
- spec/lib/packaging/artifactory_spec.rb
|
|
329
|
-
- spec/lib/packaging/tar_spec.rb
|
|
330
|
-
- spec/lib/packaging/config_spec.rb
|
|
331
|
-
- spec/lib/packaging/deb_spec.rb
|
|
332
|
-
- spec/lib/packaging/deb/repo_spec.rb
|
|
333
|
-
- spec/lib/packaging/repo_spec.rb
|
|
334
|
-
- spec/lib/packaging/retrieve_spec.rb
|
|
335
|
-
- spec/lib/packaging/sign_spec.rb
|
|
336
|
-
- spec/lib/packaging/paths_spec.rb
|
|
337
|
-
- spec/lib/packaging/util/git_tag_spec.rb
|
|
338
|
-
- spec/lib/packaging/util/os_spec.rb
|
|
339
328
|
- spec/lib/packaging/util/jenkins_spec.rb
|
|
340
|
-
- spec/lib/packaging/util/gpg_spec.rb
|
|
341
|
-
- spec/lib/packaging/util/net_spec.rb
|
|
342
|
-
- spec/lib/packaging/util/ship_spec.rb
|
|
343
329
|
- spec/lib/packaging/util/rake_utils_spec.rb
|
|
344
|
-
- spec/lib/packaging/util/
|
|
345
|
-
- spec/lib/packaging/util/misc_spec.rb
|
|
330
|
+
- spec/lib/packaging/util/ship_spec.rb
|
|
346
331
|
- spec/lib/packaging/util/file_spec.rb
|
|
332
|
+
- spec/lib/packaging/util/git_tag_spec.rb
|
|
333
|
+
- spec/lib/packaging/util/net_spec.rb
|
|
334
|
+
- spec/lib/packaging/util/os_spec.rb
|
|
347
335
|
- spec/lib/packaging/util/git_spec.rb
|
|
336
|
+
- spec/lib/packaging/util/execution_spec.rb
|
|
348
337
|
- spec/lib/packaging/util/version_spec.rb
|
|
338
|
+
- spec/lib/packaging/util/misc_spec.rb
|
|
339
|
+
- spec/lib/packaging/util/gpg_spec.rb
|
|
340
|
+
- spec/lib/packaging/retrieve_spec.rb
|
|
341
|
+
- spec/lib/packaging/deb/repo_spec.rb
|
|
342
|
+
- spec/lib/packaging/tar_spec.rb
|
|
343
|
+
- spec/lib/packaging/gem_spec.rb
|
|
344
|
+
- spec/lib/packaging/paths_spec.rb
|
|
345
|
+
- spec/lib/packaging/config_spec.rb
|
|
349
346
|
- spec/lib/packaging/rpm/repo_spec.rb
|
|
347
|
+
- spec/lib/packaging/sign_spec.rb
|
|
348
|
+
- spec/lib/packaging/repo_spec.rb
|
|
349
|
+
- spec/lib/packaging/deb_spec.rb
|
|
350
350
|
- spec/lib/packaging_spec.rb
|