packaging 0.112.0 → 0.113.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/artifactory.rb +25 -13
- data/lib/packaging/platforms.rb +13 -0
- data/lib/packaging/sign/msi.rb +1 -1
- data/spec/lib/packaging/platforms_spec.rb +1 -1
- data/tasks/30_metrics.rake +5 -5
- data/tasks/apple.rake +2 -2
- data/tasks/jenkins.rake +14 -11
- data/tasks/ship.rake +4 -4
- 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: 38a695c2a203545ed683903f02ae7fa8c5061c4cc2f9df51b51421527e479873
|
4
|
+
data.tar.gz: 9efef213c86d137b864401c7bc51d96c242c4bba6f8086652b727f325588ecd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1ecea7327e7f846700180f7f80a3f07baad08ae1b432261ba3b500438fd8232af5b676b6593905f6dc8117b4e6c84d7523fec06a915128297b1bb60b992d98e
|
7
|
+
data.tar.gz: b078ed636dbd2b8aa327c1a1784fa463d5c9aebf3ea5bc48c0fa9aafc015bfdee698d64544bbe7974b745219972224444f0413feb6cfcf59aadcd8f534216073
|
@@ -362,7 +362,7 @@ module Pkg
|
|
362
362
|
warn "Package list for #{dist} is empty, skipping"
|
363
363
|
next
|
364
364
|
end
|
365
|
-
packages.
|
365
|
+
packages.each_value do |info|
|
366
366
|
package_file_name = info['filename']
|
367
367
|
puts format(
|
368
368
|
"Searching Artifactory [%s]%s for %s (md5: %s)",
|
@@ -604,20 +604,27 @@ module Pkg
|
|
604
604
|
properties = { 'deb.component' => target_debian_component }
|
605
605
|
copied_artifact.properties(properties)
|
606
606
|
end
|
607
|
-
|
607
|
+
end
|
608
608
|
|
609
|
-
# When we cut a new PE branch, we need to copy the pe components
|
610
|
-
#
|
611
|
-
# @param
|
609
|
+
# When we cut a new PE branch, we need to copy the pe components
|
610
|
+
# into <pe_version>/{repos,feature,release}/<platform>
|
611
|
+
# @param manifest [File] JSON file containing information about which packages to download
|
612
|
+
# and their corresponding md5sums
|
613
|
+
# @param target_path [String] path on artifactory to copy components to
|
614
|
+
# Example: <pe_version>/release
|
612
615
|
def populate_pe_repos(manifest, target_path)
|
613
616
|
check_authorization
|
614
617
|
manifest.each do |dist, packages|
|
615
618
|
puts "Copying #{dist} packages..."
|
616
|
-
packages.
|
617
|
-
filename = info[
|
618
|
-
artifact = Artifactory::Resource::Artifact.checksum_search(
|
619
|
+
packages.each_value do |info|
|
620
|
+
filename = info['filename']
|
621
|
+
artifact = Artifactory::Resource::Artifact.checksum_search(
|
622
|
+
md5: (info['md5']).to_s,
|
623
|
+
repos: ['rpm_enterprise__local', 'debian_enterprise__local'],
|
624
|
+
name: filename
|
625
|
+
).first
|
619
626
|
if artifact.nil?
|
620
|
-
raise "Error:
|
627
|
+
raise "Error: could not find package #{filename} with md5sum #{info['md5']}"
|
621
628
|
end
|
622
629
|
copy_artifact(artifact, artifact.repo, "#{target_path}/#{dist}/#{filename}")
|
623
630
|
end
|
@@ -639,17 +646,22 @@ module Pkg
|
|
639
646
|
end
|
640
647
|
|
641
648
|
# Remove promoted artifacts if promotion is reverted, use information provided in manifest
|
642
|
-
# @param manifest [File] JSON file containing information about what packages to
|
649
|
+
# @param manifest [File] JSON file containing information about what packages to
|
650
|
+
# download and the corresponding md5sums
|
643
651
|
# @param remote_path [String] path on artifactory to promoted packages ex. 2019.1/repos/
|
644
652
|
# @param package [String] package name ex. puppet-agent
|
645
653
|
# @param repos [Array] the repos the promoted artifacts live
|
646
654
|
def remove_promoted_packages(manifest, remote_path, package, repos)
|
647
655
|
check_authorization
|
648
|
-
manifest.
|
656
|
+
manifest.each_value do |packages|
|
649
657
|
packages.each do |package_name, info|
|
650
658
|
next unless package_name == package
|
651
|
-
filename = info[
|
652
|
-
artifacts = Artifactory::Resource::Artifact.checksum_search(
|
659
|
+
filename = info['filename']
|
660
|
+
artifacts = Artifactory::Resource::Artifact.checksum_search(
|
661
|
+
md5: (info['md5']).to_s,
|
662
|
+
repos: repos,
|
663
|
+
name: filename
|
664
|
+
)
|
653
665
|
artifacts.each do |artifact|
|
654
666
|
next unless artifact.download_uri.include? remote_path
|
655
667
|
puts "Removing reverted package #{artifact.download_uri}"
|
data/lib/packaging/platforms.rb
CHANGED
@@ -55,6 +55,14 @@ module Pkg
|
|
55
55
|
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
56
56
|
repo: true,
|
57
57
|
},
|
58
|
+
'12' => {
|
59
|
+
codename: 'bookworm',
|
60
|
+
architectures: ['amd64', 'aarch64'],
|
61
|
+
source_architecture: 'source',
|
62
|
+
package_format: 'deb',
|
63
|
+
source_package_formats: DEBIAN_SOURCE_FORMATS,
|
64
|
+
repo: true,
|
65
|
+
},
|
58
66
|
},
|
59
67
|
|
60
68
|
'el' => {
|
@@ -119,6 +127,11 @@ module Pkg
|
|
119
127
|
package_format: 'dmg',
|
120
128
|
repo: false,
|
121
129
|
},
|
130
|
+
'14' => {
|
131
|
+
architectures: ['x86_64', 'arm64'],
|
132
|
+
package_format: 'dmg',
|
133
|
+
repo: false,
|
134
|
+
},
|
122
135
|
},
|
123
136
|
|
124
137
|
'redhatfips' => {
|
data/lib/packaging/sign/msi.rb
CHANGED
@@ -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', 'jammy']
|
39
|
+
codenames = ['focal', 'bionic', 'bullseye', 'buster', 'bookworm', 'jammy']
|
40
40
|
expect(Pkg::Platforms.codenames).to match_array(codenames)
|
41
41
|
end
|
42
42
|
end
|
data/tasks/30_metrics.rake
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
@metrics = []
|
2
2
|
def add_shipped_metrics(args)
|
3
3
|
@metrics << {
|
4
|
-
:type
|
5
|
-
:package
|
6
|
-
:version
|
7
|
-
:pe_version
|
8
|
-
:is_rc
|
4
|
+
:type => 'shipped',
|
5
|
+
:package => args[:package] || Pkg::Config.project,
|
6
|
+
:version => args[:version] || Pkg::Config.version,
|
7
|
+
:pe_version => args[:pe_version] || Pkg::Config.pe_version,
|
8
|
+
:is_rc => args[:is_rc] || false,
|
9
9
|
}
|
10
10
|
end
|
11
11
|
|
data/tasks/apple.rake
CHANGED
@@ -53,7 +53,7 @@ def make_directory_tree
|
|
53
53
|
}
|
54
54
|
puts "Cleaning Tree: #{project_tmp}"
|
55
55
|
rm_rf(project_tmp)
|
56
|
-
@working_tree.
|
56
|
+
@working_tree.each_value do |val|
|
57
57
|
mkdir_p(val)
|
58
58
|
end
|
59
59
|
|
@@ -162,7 +162,7 @@ def pack_source
|
|
162
162
|
# Do a run through first setting the specified permissions then
|
163
163
|
# making sure 755 is set for all directories
|
164
164
|
unless @source_files['directories'].nil?
|
165
|
-
@source_files['directories'].
|
165
|
+
@source_files['directories'].each_value do |params|
|
166
166
|
owner = params['owner']
|
167
167
|
group = params['group']
|
168
168
|
perms = params['perms']
|
data/tasks/jenkins.rake
CHANGED
@@ -512,13 +512,17 @@ namespace :pl do
|
|
512
512
|
namespace :jenkins do
|
513
513
|
desc "Trigger a jenkins uri with SHA of HEAD as a string param, requires \"URI\""
|
514
514
|
task :post, :uri do |t, args|
|
515
|
-
uri =
|
515
|
+
uri = args.uri || ENV['URI']
|
516
|
+
|
517
|
+
unless uri
|
518
|
+
fail 'pl:jenkins:post requires a URI, either via URI= or pl:jenkin:post[URI]'
|
519
|
+
end
|
516
520
|
|
517
521
|
# We use JSON for parsing the json part of the submission.
|
518
522
|
begin
|
519
523
|
require 'json'
|
520
|
-
rescue LoadError
|
521
|
-
fail "
|
524
|
+
rescue LoadError => e
|
525
|
+
fail "Error: could not load 'json' gem: #{e}"
|
522
526
|
end
|
523
527
|
|
524
528
|
# Assemble the JSON string for the JSON parameter
|
@@ -526,17 +530,16 @@ namespace :pl do
|
|
526
530
|
|
527
531
|
# Assemble our arguments to the post
|
528
532
|
args = [
|
529
|
-
|
530
|
-
|
531
|
-
|
533
|
+
"-Fname=SHA", "-Fvalue=#{Pkg::Config.ref}",
|
534
|
+
"-Fjson=#{json.to_json}",
|
535
|
+
"-FSubmit=Build"
|
532
536
|
]
|
533
|
-
|
534
537
|
_, retval = Pkg::Util::Net.curl_form_data(uri, args)
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
fail "An error occurred attempting to trigger the job at #{uri}. Please see the preceding http response for more info."
|
538
|
+
unless Pkg::Util::Execution.success?(retval)
|
539
|
+
fail "An error occurred attempting to trigger the job at \"#{uri}\". " \
|
540
|
+
"See the preceding http response for more information."
|
539
541
|
end
|
542
|
+
puts "Job triggered at #{uri}."
|
540
543
|
end
|
541
544
|
end
|
542
545
|
end
|
data/tasks/ship.rake
CHANGED
@@ -8,7 +8,7 @@ namespace :pl do
|
|
8
8
|
|
9
9
|
desc "Update '#{Pkg::Config.repo_name}' yum repository on '#{Pkg::Config.yum_staging_server}'"
|
10
10
|
task update_yum_repo: 'pl:fetch' do
|
11
|
-
command = Pkg::Config.yum_repo_command
|
11
|
+
command = Pkg::Config.yum_repo_command
|
12
12
|
$stdout.puts "Really run remote repo update on '#{Pkg::Config.yum_staging_server}'? [y,n]"
|
13
13
|
next unless Pkg::Util.ask_yes_or_no
|
14
14
|
|
@@ -25,7 +25,7 @@ namespace :pl do
|
|
25
25
|
|
26
26
|
desc "Update all final yum repositories on '#{Pkg::Config.yum_staging_server}'"
|
27
27
|
task update_all_final_yum_repos: 'pl:fetch' do
|
28
|
-
command = Pkg::Config.yum_repo_command
|
28
|
+
command = Pkg::Config.yum_repo_command
|
29
29
|
$stdout.puts "Really run remote repo update on '#{Pkg::Config.yum_staging_server}'? [y,n]"
|
30
30
|
next unless Pkg::Util.ask_yes_or_no
|
31
31
|
|
@@ -42,7 +42,7 @@ namespace :pl do
|
|
42
42
|
|
43
43
|
desc "Update '#{Pkg::Config.nonfinal_repo_name}' nightly yum repository on '#{Pkg::Config.yum_staging_server}'"
|
44
44
|
task update_nightlies_yum_repo: 'pl:fetch' do
|
45
|
-
command = Pkg::Config.yum_repo_command
|
45
|
+
command = Pkg::Config.yum_repo_command
|
46
46
|
$stdout.puts "Really run remote repo update on '#{Pkg::Config.yum_staging_server}'? [y,n]"
|
47
47
|
next unless Pkg::Util.ask_yes_or_no
|
48
48
|
|
@@ -59,7 +59,7 @@ namespace :pl do
|
|
59
59
|
|
60
60
|
desc "Update all nightly yum repositories on '#{Pkg::Config.yum_staging_server}'"
|
61
61
|
task update_all_nightlies_yum_repos: 'pl:fetch' do
|
62
|
-
command = Pkg::Config.yum_repo_command
|
62
|
+
command = Pkg::Config.yum_repo_command
|
63
63
|
$stdout.puts "Really run remote repo update on '#{Pkg::Config.yum_staging_server}'? [y,n]"
|
64
64
|
next unless Pkg::Util.ask_yes_or_no
|
65
65
|
|
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.113.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet By Perforce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -308,27 +308,27 @@ specification_version: 4
|
|
308
308
|
summary: Puppet by Perforce packaging automation
|
309
309
|
test_files:
|
310
310
|
- spec/lib/packaging_spec.rb
|
311
|
-
- spec/lib/packaging/config_spec.rb
|
312
|
-
- spec/lib/packaging/deb/repo_spec.rb
|
313
311
|
- spec/lib/packaging/sign_spec.rb
|
314
|
-
- spec/lib/packaging/
|
315
|
-
- spec/lib/packaging/repo_spec.rb
|
312
|
+
- spec/lib/packaging/gem_spec.rb
|
313
|
+
- spec/lib/packaging/deb/repo_spec.rb
|
314
|
+
- spec/lib/packaging/artifactory_spec.rb
|
315
|
+
- spec/lib/packaging/tar_spec.rb
|
316
316
|
- spec/lib/packaging/deb_spec.rb
|
317
|
+
- spec/lib/packaging/retrieve_spec.rb
|
318
|
+
- spec/lib/packaging/config_spec.rb
|
317
319
|
- spec/lib/packaging/platforms_spec.rb
|
318
|
-
- spec/lib/packaging/
|
319
|
-
- spec/lib/packaging/
|
320
|
-
- spec/lib/packaging/
|
321
|
-
- spec/lib/packaging/util/os_spec.rb
|
322
|
-
- spec/lib/packaging/util/jenkins_spec.rb
|
323
|
-
- spec/lib/packaging/util/rake_utils_spec.rb
|
320
|
+
- spec/lib/packaging/paths_spec.rb
|
321
|
+
- spec/lib/packaging/rpm/repo_spec.rb
|
322
|
+
- spec/lib/packaging/repo_spec.rb
|
324
323
|
- spec/lib/packaging/util/execution_spec.rb
|
325
|
-
- spec/lib/packaging/util/
|
326
|
-
- spec/lib/packaging/util/
|
324
|
+
- spec/lib/packaging/util/rake_utils_spec.rb
|
325
|
+
- spec/lib/packaging/util/jenkins_spec.rb
|
326
|
+
- spec/lib/packaging/util/os_spec.rb
|
327
|
+
- spec/lib/packaging/util/misc_spec.rb
|
327
328
|
- spec/lib/packaging/util/net_spec.rb
|
329
|
+
- spec/lib/packaging/util/git_spec.rb
|
328
330
|
- spec/lib/packaging/util/ship_spec.rb
|
329
|
-
- spec/lib/packaging/util/
|
331
|
+
- spec/lib/packaging/util/file_spec.rb
|
332
|
+
- spec/lib/packaging/util/version_spec.rb
|
330
333
|
- spec/lib/packaging/util/git_tag_spec.rb
|
331
|
-
- spec/lib/packaging/util/
|
332
|
-
- spec/lib/packaging/rpm/repo_spec.rb
|
333
|
-
- spec/lib/packaging/retrieve_spec.rb
|
334
|
-
- spec/lib/packaging/gem_spec.rb
|
334
|
+
- spec/lib/packaging/util/gpg_spec.rb
|