packaging 0.106.3 → 0.107.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 +8 -0
- data/spec/lib/packaging/paths_spec.rb +6 -0
- data/spec/lib/packaging/platforms_spec.rb +6 -2
- data/tasks/ship.rake +42 -22
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a52b5e4526f37d1bf4ebacf7a4c8de7c8b6cf2fb96ababbc1873384381e42903
|
4
|
+
data.tar.gz: 626f5a46015f53bac68d7dc29fd712efa5a5e7180079444c7f6aecda91ce520c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf0029e52dd115687b71974542ab056555ebaa5d0f8886c4a01ff14f072b6dea4cd3ad509ea66b8dd8ea0c36bf324b27e5cdb289e86202c0c15bd8c7d64cb890
|
7
|
+
data.tar.gz: 4e8cde5da7d1fe12d6677582419c4b7e15a0fbe9d499fbfb29fc6e0e82e6c41583ca254d7c4ca861e959d22d1ed5f0a1270b02c0899ae58c230addc9d3015eba
|
data/lib/packaging/platforms.rb
CHANGED
@@ -211,6 +211,14 @@ module Pkg
|
|
211
211
|
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
212
212
|
repo: true,
|
213
213
|
},
|
214
|
+
'22.04' => {
|
215
|
+
codename: 'jammy',
|
216
|
+
architectures: ['amd64', 'aarch64'],
|
217
|
+
source_architecture: 'source',
|
218
|
+
package_format: 'deb',
|
219
|
+
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
220
|
+
repo: true,
|
221
|
+
},
|
214
222
|
},
|
215
223
|
|
216
224
|
'windows' => {
|
@@ -147,6 +147,10 @@ describe 'Pkg::Paths' do
|
|
147
147
|
expect(Pkg::Paths.artifacts_path('ubuntu-20.04-amd64'))
|
148
148
|
.to eq('artifacts/FUTURE-puppet7/focal')
|
149
149
|
end
|
150
|
+
it 'should be correct for jammy' do
|
151
|
+
expect(Pkg::Paths.artifacts_path('ubuntu-22.04-amd64'))
|
152
|
+
.to eq('artifacts/FUTURE-puppet7/jammy')
|
153
|
+
end
|
150
154
|
end
|
151
155
|
end
|
152
156
|
|
@@ -328,6 +332,8 @@ describe 'Pkg::Paths' do
|
|
328
332
|
.to eq('/opt/repository/apt/FUTURE-puppet7/pool/bionic/p/puppet-agent')
|
329
333
|
expect(Pkg::Paths.apt_package_base_path('ubuntu-20.04-amd64', 'FUTURE-puppet7', 'puppet-agent'))
|
330
334
|
.to eq('/opt/repository/apt/FUTURE-puppet7/pool/focal/p/puppet-agent')
|
335
|
+
expect(Pkg::Paths.apt_package_base_path('ubuntu-22.04-amd64', 'FUTURE-puppet7', 'puppet-agent'))
|
336
|
+
.to eq('/opt/repository/apt/FUTURE-puppet7/pool/jammy/p/puppet-agent')
|
331
337
|
end
|
332
338
|
it 'returns the appropriate nonfinal repo path' do
|
333
339
|
allow(Pkg::Paths).to receive(:remote_repo_base).and_return('/opt/repository-nightlies/apt')
|
@@ -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', 'bullseye', 'buster', 'stretch', 'trusty', 'xenial']
|
39
|
+
codenames = ['focal', 'bionic', 'bullseye', 'buster', 'stretch', 'trusty', 'xenial', 'jammy']
|
40
40
|
expect(Pkg::Platforms.codenames).to match_array(codenames)
|
41
41
|
end
|
42
42
|
end
|
@@ -46,6 +46,10 @@ describe 'Pkg::Platforms' do
|
|
46
46
|
expect(Pkg::Platforms.codename_to_platform_version('xenial')).to eq(['ubuntu', '16.04'])
|
47
47
|
end
|
48
48
|
|
49
|
+
it 'should return the platform and version corresponding to a given codename' do
|
50
|
+
expect(Pkg::Platforms.codename_to_platform_version('jammy')).to eq(['ubuntu', '22.04'])
|
51
|
+
end
|
52
|
+
|
49
53
|
it 'should fail if given nil as a codename' do
|
50
54
|
expect{Pkg::Platforms.codename_to_platform_version(nil)}.to raise_error
|
51
55
|
end
|
@@ -53,7 +57,7 @@ describe 'Pkg::Platforms' do
|
|
53
57
|
|
54
58
|
describe '#codename_for_platform_version' do
|
55
59
|
it 'should return the codename corresponding to a given platform and version' do
|
56
|
-
expect(Pkg::Platforms.codename_for_platform_version('ubuntu', '
|
60
|
+
expect(Pkg::Platforms.codename_for_platform_version('ubuntu', '22.04')).to eq('jammy')
|
57
61
|
end
|
58
62
|
end
|
59
63
|
|
data/tasks/ship.rake
CHANGED
@@ -243,62 +243,82 @@ namespace :pl do
|
|
243
243
|
S3_REPO_SYNC = 'sudo /usr/local/bin/s3_repo_sync.sh'
|
244
244
|
GCP_REPO_SYNC = '/usr/local/bin/gcp_repo_sync'
|
245
245
|
|
246
|
-
desc "Sync signed apt repos from #{Pkg::Config.apt_signing_server} to
|
246
|
+
desc "Sync signed apt repos from #{Pkg::Config.apt_signing_server} to S3 and GCP"
|
247
247
|
task :deploy_apt_repo_to_s3 => 'pl:fetch' do
|
248
|
-
|
249
|
-
|
248
|
+
s3_sync_command = "#{S3_REPO_SYNC} apt.puppetlabs.com"
|
249
|
+
gcp_sync_command = "#{GCP_REPO_SYNC} apt.puppetlabs.com"
|
250
|
+
|
251
|
+
puts "Sync apt repos from #{Pkg::Config.apt_signing_server} to S3 and GCP? [y,n]"
|
250
252
|
next unless Pkg::Util.ask_yes_or_no
|
251
253
|
|
252
254
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
253
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.apt_signing_server,
|
255
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.apt_signing_server, s3_sync_command)
|
256
|
+
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)
|
254
260
|
end
|
255
261
|
end
|
256
262
|
|
257
|
-
desc "Sync signed yum repos from #{Pkg::Config.yum_staging_server} to
|
263
|
+
desc "Sync signed yum repos from #{Pkg::Config.yum_staging_server} to S3 and GCP"
|
258
264
|
task :deploy_yum_repo_to_s3 => 'pl:fetch' do
|
259
|
-
|
260
|
-
|
265
|
+
s3_sync_command = "#{S3_REPO_SYNC} yum.puppetlabs.com"
|
266
|
+
gcp_sync_command = "#{GCP_REPO_SYNC} yum.puppetlabs.com"
|
267
|
+
puts "Sync yum repos from #{Pkg::Config.yum_staging_server} to S3 and GCP? [y,n]"
|
261
268
|
next unless Pkg::Util.ask_yes_or_no
|
262
269
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
263
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.yum_staging_server,
|
270
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.yum_staging_server, s3_sync_command)
|
271
|
+
end
|
272
|
+
|
273
|
+
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
274
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.yum_staging_server, gcp_sync_command)
|
264
275
|
end
|
265
276
|
end
|
266
277
|
|
267
|
-
desc "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to
|
278
|
+
desc "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to S3 and GCP"
|
268
279
|
task :deploy_downloads_to_s3 => 'pl:fetch' do
|
269
|
-
|
270
|
-
|
280
|
+
s3_sync_command = "#{S3_REPO_SYNC} downloads.puppetlabs.com"
|
281
|
+
gcp_sync_command = "#{GCP_REPO_SYNC} downloads.puppetlabs.com"
|
282
|
+
puts "Sync downloads.puppetlabs.com from #{Pkg::Config.staging_server} to S3 and GCP? [y,n]"
|
271
283
|
next unless Pkg::Util.ask_yes_or_no
|
272
284
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
273
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server,
|
285
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, s3_sync_command)
|
286
|
+
end
|
287
|
+
|
288
|
+
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
289
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, gcp_sync_command)
|
274
290
|
end
|
275
291
|
end
|
276
292
|
|
277
|
-
desc "Sync nightlies.puppet.com from #{Pkg::Config.staging_server} to
|
293
|
+
desc "Sync nightlies.puppet.com from #{Pkg::Config.staging_server} to S3 and GCP"
|
278
294
|
task :deploy_nightlies_to_s3 => 'pl:fetch' do
|
279
|
-
|
280
|
-
|
295
|
+
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
|
+
|
281
302
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
282
|
-
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server,
|
303
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.staging_server, gcp_sync_command)
|
283
304
|
end
|
284
305
|
end
|
285
306
|
|
286
307
|
desc "Sync signed apt repos from #{Pkg::Config.apt_signing_server} to Google Cloud Platform"
|
287
308
|
task :sync_apt_repo_to_gcp => 'pl:fetch' do
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
sync_command_puppet_7 = "#{GCP_REPO_SYNC} apt.repos.puppet.com puppet7"
|
309
|
+
target_site = 'apt.repos.puppet.com'
|
310
|
+
sync_command_puppet_6 = "#{GCP_REPO_SYNC} #{target_site} puppet6"
|
311
|
+
sync_command_puppet_7 = "#{GCP_REPO_SYNC} #{target_site} puppet7"
|
292
312
|
print "Sync apt repos from #{Pkg::Config.apt_signing_server} to #{target_site}? [y,n] "
|
293
313
|
next unless Pkg::Util.ask_yes_or_no
|
294
314
|
puts
|
295
315
|
|
296
316
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
297
|
-
|
317
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.apt_signing_server, sync_command_puppet_6)
|
298
318
|
end
|
299
319
|
|
300
320
|
Pkg::Util::Execution.retry_on_fail(times: 3) do
|
301
|
-
|
321
|
+
Pkg::Util::Net.remote_execute(Pkg::Config.apt_signing_server, sync_command_puppet_7)
|
302
322
|
end
|
303
323
|
end
|
304
324
|
# Keep 'deploy' for backward compatibility
|
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.107.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-06-14 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_spec.rb
|
327
|
-
- spec/lib/packaging/platforms_spec.rb
|
328
|
-
- spec/lib/packaging/deb/repo_spec.rb
|
329
|
-
- spec/lib/packaging/artifactory_spec.rb
|
330
326
|
- spec/lib/packaging/gem_spec.rb
|
331
|
-
- spec/lib/packaging/deb_spec.rb
|
332
327
|
- spec/lib/packaging/retrieve_spec.rb
|
328
|
+
- spec/lib/packaging/repo_spec.rb
|
329
|
+
- spec/lib/packaging/tar_spec.rb
|
330
|
+
- spec/lib/packaging/deb/repo_spec.rb
|
331
|
+
- spec/lib/packaging/platforms_spec.rb
|
332
|
+
- spec/lib/packaging/artifactory_spec.rb
|
333
333
|
- spec/lib/packaging/sign_spec.rb
|
334
334
|
- spec/lib/packaging/config_spec.rb
|
335
|
-
- spec/lib/packaging/
|
335
|
+
- spec/lib/packaging/paths_spec.rb
|
336
|
+
- spec/lib/packaging/deb_spec.rb
|
337
|
+
- spec/lib/packaging/rpm/repo_spec.rb
|
338
|
+
- spec/lib/packaging/util/git_tag_spec.rb
|
336
339
|
- spec/lib/packaging/util/execution_spec.rb
|
337
|
-
- spec/lib/packaging/util/
|
340
|
+
- spec/lib/packaging/util/version_spec.rb
|
341
|
+
- spec/lib/packaging/util/misc_spec.rb
|
342
|
+
- spec/lib/packaging/util/net_spec.rb
|
338
343
|
- spec/lib/packaging/util/rake_utils_spec.rb
|
339
|
-
- spec/lib/packaging/util/git_tag_spec.rb
|
340
344
|
- spec/lib/packaging/util/ship_spec.rb
|
341
|
-
- spec/lib/packaging/util/jenkins_spec.rb
|
342
|
-
- spec/lib/packaging/util/net_spec.rb
|
343
|
-
- spec/lib/packaging/util/os_spec.rb
|
344
|
-
- spec/lib/packaging/util/version_spec.rb
|
345
345
|
- spec/lib/packaging/util/file_spec.rb
|
346
|
-
- spec/lib/packaging/util/
|
347
|
-
- spec/lib/packaging/
|
348
|
-
- spec/lib/packaging/
|
349
|
-
- spec/lib/packaging/
|
350
|
-
- spec/lib/
|
346
|
+
- spec/lib/packaging/util/os_spec.rb
|
347
|
+
- spec/lib/packaging/util/jenkins_spec.rb
|
348
|
+
- spec/lib/packaging/util/git_spec.rb
|
349
|
+
- spec/lib/packaging/util/gpg_spec.rb
|
350
|
+
- spec/lib/packaging_spec.rb
|