puppet 2.7.20 → 2.7.21

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (81) hide show
  1. data/CHANGELOG +226 -0
  2. data/conf/auth.conf +3 -3
  3. data/ext/packaging/README.md +191 -57
  4. data/ext/packaging/spec/spec_helper.rb +2 -2
  5. data/ext/packaging/spec/tasks/00_utils_spec.rb +63 -18
  6. data/ext/packaging/spec/tasks/build_object_spec.rb +171 -0
  7. data/ext/packaging/tasks/00_utils.rake +186 -33
  8. data/ext/packaging/tasks/10_setupvars.rake +94 -65
  9. data/ext/packaging/tasks/20_setupextravars.rake +45 -26
  10. data/ext/packaging/tasks/30_metrics.rake +41 -0
  11. data/ext/packaging/tasks/apple.rake +92 -36
  12. data/ext/packaging/tasks/build.rake +183 -0
  13. data/ext/packaging/tasks/deb.rake +45 -40
  14. data/ext/packaging/tasks/deb_repos.rake +103 -0
  15. data/ext/packaging/tasks/doc.rake +5 -5
  16. data/ext/packaging/tasks/fetch.rake +35 -10
  17. data/ext/packaging/tasks/gem.rake +38 -27
  18. data/ext/packaging/tasks/ips.rake +14 -14
  19. data/ext/packaging/tasks/jenkins.rake +337 -0
  20. data/ext/packaging/tasks/mock.rake +153 -72
  21. data/ext/packaging/tasks/pe_deb.rake +2 -2
  22. data/ext/packaging/tasks/pe_remote.rake +22 -19
  23. data/ext/packaging/tasks/pe_rpm.rake +5 -5
  24. data/ext/packaging/tasks/pe_ship.rake +31 -21
  25. data/ext/packaging/tasks/pe_sign.rake +20 -19
  26. data/ext/packaging/tasks/pe_sles.rake +40 -36
  27. data/ext/packaging/tasks/pe_tar.rake +5 -0
  28. data/ext/packaging/tasks/release.rake +32 -12
  29. data/ext/packaging/tasks/remote_build.rake +141 -83
  30. data/ext/packaging/tasks/retrieve.rake +23 -0
  31. data/ext/packaging/tasks/rpm.rake +11 -19
  32. data/ext/packaging/tasks/rpm_repos.rake +127 -0
  33. data/ext/packaging/tasks/ship.rake +68 -55
  34. data/ext/packaging/tasks/sign.rake +38 -10
  35. data/ext/packaging/tasks/tar.rake +25 -9
  36. data/ext/packaging/tasks/update.rake +2 -2
  37. data/ext/packaging/tasks/version.rake +34 -14
  38. data/ext/packaging/tasks/z_data_dump.rake +33 -0
  39. data/lib/puppet/indirector/catalog/compiler.rb +13 -2
  40. data/lib/puppet/indirector/certificate_status/file.rb +5 -0
  41. data/lib/puppet/indirector/errors.rb +5 -0
  42. data/lib/puppet/indirector/file_bucket_file/file.rb +4 -0
  43. data/lib/puppet/indirector/file_bucket_file/selector.rb +4 -0
  44. data/lib/puppet/indirector/indirection.rb +1 -0
  45. data/lib/puppet/indirector/resource/active_record.rb +3 -0
  46. data/lib/puppet/indirector/resource/ral.rb +4 -0
  47. data/lib/puppet/indirector/resource/store_configs.rb +3 -0
  48. data/lib/puppet/indirector/resource/validator.rb +8 -0
  49. data/lib/puppet/indirector/rest.rb +8 -0
  50. data/lib/puppet/indirector/run/local.rb +4 -0
  51. data/lib/puppet/indirector/terminus.rb +20 -0
  52. data/lib/puppet/network/formats.rb +3 -3
  53. data/lib/puppet/network/handler/master.rb +1 -1
  54. data/lib/puppet/network/handler/report.rb +1 -1
  55. data/lib/puppet/network/http/handler.rb +7 -1
  56. data/lib/puppet/network/http/rack/rest.rb +7 -2
  57. data/lib/puppet/network/http/webrick.rb +1 -0
  58. data/lib/puppet/network/rest_authconfig.rb +1 -1
  59. data/lib/puppet/parser/templatewrapper.rb +17 -17
  60. data/lib/puppet/util/monkey_patches.rb +58 -0
  61. data/lib/puppet/version.rb +1 -1
  62. data/spec/integration/indirector/catalog/compiler_spec.rb +1 -0
  63. data/spec/integration/indirector/catalog/queue_spec.rb +1 -1
  64. data/spec/integration/resource/catalog_spec.rb +1 -0
  65. data/spec/unit/indirector/catalog/compiler_spec.rb +29 -2
  66. data/spec/unit/indirector/indirection_spec.rb +18 -1
  67. data/spec/unit/indirector/terminus_spec.rb +191 -177
  68. data/spec/unit/network/formats_spec.rb +6 -6
  69. data/spec/unit/network/http/handler_spec.rb +25 -0
  70. data/spec/unit/network/http/rack/rest_spec.rb +17 -0
  71. data/spec/unit/network/http/webrick_spec.rb +4 -0
  72. data/spec/unit/network/http_pool_spec.rb +0 -1
  73. data/spec/unit/network/rest_authconfig_spec.rb +16 -1
  74. data/spec/unit/parser/functions/inline_template_spec.rb +13 -0
  75. data/spec/unit/parser/functions/template_spec.rb +15 -0
  76. data/spec/unit/parser/templatewrapper_spec.rb +19 -4
  77. data/spec/unit/ssl/certificate_request_spec.rb +2 -0
  78. data/spec/unit/ssl/host_spec.rb +1 -0
  79. data/spec/unit/util/monkey_patches_spec.rb +12 -0
  80. data/test/language/snippets.rb +1 -1
  81. metadata +13 -2
@@ -1,27 +1,28 @@
1
1
  # The sign_el5 and sign_modern methods are defined in sign.rake
2
2
  # This is just adapted for the 'PE' layout
3
3
 
4
- namespace :pe do
5
- desc "Sign all staged in rpms in pkg"
6
- task :sign_rpms do
7
- old_rpms = FileList.new
8
- modern_rpms = FileList.new
9
- sign_dists = 'el5', 'el6', 'sles11'
10
- ['i386', 'x86_64'].each do |arch|
11
- sign_dists.each do |dist|
12
- family=dist[/[a-z]+/]
13
- version=dist[/[0-9]+/]
14
- rpm_stagedir = "pkg/pe/rpm/#{family}-#{version}-#{arch}/*.rpm"
15
- srpm_stagedir = "pkg/pe/rpm/#{family}-#{version}-srpms/*.rpm"
16
- if family == 'el' and version == '6'
17
- modern_rpms += FileList[rpm_stagedir] + FileList[srpm_stagedir]
18
- else
19
- old_rpms += FileList[rpm_stagedir] + FileList[srpm_stagedir]
4
+ if @build.build_pe
5
+ namespace :pe do
6
+ desc "Sign all staged in rpms in pkg"
7
+ task :sign_rpms do
8
+ old_rpms = FileList.new
9
+ modern_rpms = FileList.new
10
+ sign_dists = 'el5', 'el6', 'sles11'
11
+ ['i386', 'x86_64'].each do |arch|
12
+ sign_dists.each do |dist|
13
+ family=dist[/[a-z]+/]
14
+ version=dist[/[0-9]+/]
15
+ rpm_stagedir = "pkg/pe/rpm/#{family}-#{version}-#{arch}/*.rpm"
16
+ srpm_stagedir = "pkg/pe/rpm/#{family}-#{version}-srpms/*.rpm"
17
+ if family == 'el' and version == '6'
18
+ modern_rpms += FileList[rpm_stagedir] + FileList[srpm_stagedir]
19
+ else
20
+ old_rpms += FileList[rpm_stagedir] + FileList[srpm_stagedir]
21
+ end
20
22
  end
21
23
  end
24
+ sign_el5(old_rpms) unless old_rpms.empty?
25
+ sign_modern(modern_rpms) unless modern_rpms.empty?
22
26
  end
23
- sign_el5(old_rpms) unless old_rpms.empty?
24
- sign_modern(modern_rpms) unless modern_rpms.empty?
25
27
  end
26
28
  end
27
-
@@ -4,24 +4,24 @@
4
4
  # directories/files set up for building an rpm.
5
5
  # return the directory
6
6
 
7
- if @build_pe
7
+ if @build.build_pe
8
8
  def prep_sles_dir
9
9
  temp = get_temp
10
- check_file("pkg/#{@name}-#{@version}.tar.gz")
10
+ check_file("pkg/#{@build.project}-#{@build.version}.tar.gz")
11
11
  mkdir_pr temp, "#{temp}/SOURCES", "#{temp}/SPECS"
12
- if @sign_tar
12
+ if @build.sign_tar
13
13
  Rake::Task["pl:sign_tar"].invoke
14
- cp_p "pkg/#{@name}-#{@version}.tar.gz.asc", "#{temp}/SOURCES"
14
+ cp_p "pkg/#{@build.project}-#{@build.version}.tar.gz.asc", "#{temp}/SOURCES"
15
15
  end
16
- cp_p "pkg/#{@name}-#{@version}.tar.gz", "#{temp}/SOURCES"
17
- erb "ext/redhat/#{@name}.spec.erb", "#{temp}/SPECS/#{@name}.spec"
16
+ cp_p "pkg/#{@build.project}-#{@build.version}.tar.gz", "#{temp}/SOURCES"
17
+ erb "ext/redhat/#{@build.project}.spec.erb", "#{temp}/SPECS/#{@build.project}.spec"
18
18
  temp
19
19
  end
20
20
 
21
21
  namespace :pe do
22
22
  # Temporary task to pull down pe dependencies until this is NFS-mounted
23
- task :retrieve_sles_deps => 'pl:load_extras' do
24
- rsync_from("#{@sles_repo_path}/#{@pe_version}/repos/sles-*", @sles_repo_host, "#{ENV['HOME']}/package_repos/")
23
+ task :retrieve_sles_deps => 'pl:fetch' do
24
+ rsync_from("#{@build.sles_repo_path}/#{@build.pe_version}/repos/sles-*", @build.sles_repo_host, "#{ENV['HOME']}/package_repos/")
25
25
  FileList["#{ENV['HOME']}/package_repos/*"].each do |f|
26
26
  update_rpm_repo(f) if File.directory?(f)
27
27
  end
@@ -35,9 +35,8 @@ if @build_pe
35
35
  end
36
36
  end
37
37
 
38
- # pl:setup_el_dirs is defined in mock.rake
39
38
  desc "Build a sles rpm from this repo"
40
- task :local_sles => ['package:tar', 'pl:setup_el_dirs', 'pl:fetch', 'pl:load_extras', 'pe:retrieve_sles_deps'] do
39
+ task :local_sles => ['package:tar', 'pl:fetch', 'pe:retrieve_sles_deps'] do
41
40
  check_tool('build')
42
41
  check_tool('linux32')
43
42
  check_tool('linux64')
@@ -45,41 +44,46 @@ if @build_pe
45
44
  work_dir = prep_sles_dir
46
45
  build_source_dir = "#{work_dir}/SOURCES"
47
46
  build_spec_dir = "#{work_dir}/SPECS"
48
- build_spec = "#{build_spec_dir}/#{@name}.spec"
47
+ build_spec = "#{build_spec_dir}/#{@build.project}.spec"
49
48
  build_dest_dir = "usr/src/packages"
50
49
  noarch = FALSE
51
- build_dep_dir = @sles_build_deps_dir
52
- build_os_dep_dir = @sles_build_iso_dir
53
50
  built_arch = ''
54
- @sles_arch_repos.each do |arch, deps_repo|
51
+ @build.sles_arch_repos.each do |arch, deps_repo|
55
52
  if noarch == FALSE
56
- linux_cmd = arch == 'i586' ? 'linux32' : 'linux64'
57
- sh "yes | sudo #{linux_cmd} build \
58
- --rpms #{deps_repo}:#{ENV['HOME']}/package_repos/sles-11-#{arch} \
59
- --root #{build_root}/#{arch} \
60
- --rsync-src #{build_source_dir} \
61
- --rsync-dest /usr/src/packages/SOURCES \
62
- --no-checks #{build_spec} \
63
- --arch #{arch} || true"
64
- rpms = FileList["#{build_root}/#{arch}/#{build_dest_dir}/RPMS/**/*.rpm"]
65
- srpms = FileList["#{build_root}/#{arch}/#{build_dest_dir}/SRPMS/**/*.rpm"]
66
- if rpms.empty?
67
- STDERR.puts "No RPMS were built. Perhaps an error occurred?"
68
- exit 1
53
+ bench = Benchmark.realtime do
54
+ linux_cmd = arch == 'i586' ? 'linux32' : 'linux64'
55
+ sh "yes | sudo #{linux_cmd} build \
56
+ --rpms #{deps_repo}:#{ENV['HOME']}/package_repos/sles-11-#{arch} \
57
+ --root #{build_root}/#{arch} \
58
+ --rsync-src #{build_source_dir} \
59
+ --rsync-dest /usr/src/packages/SOURCES \
60
+ --no-checks #{build_spec} \
61
+ --arch #{arch} || true"
62
+ rpms = FileList["#{build_root}/#{arch}/#{build_dest_dir}/RPMS/**/*.rpm"]
63
+ srpms = FileList["#{build_root}/#{arch}/#{build_dest_dir}/SRPMS/**/*.rpm"]
64
+ if rpms.empty?
65
+ STDERR.puts "No RPMS were built. Perhaps an error occurred?"
66
+ exit 1
67
+ end
68
+ built_arch = arch
69
+ %x{mkdir -p pkg/pe/rpm/sles-11-{srpms,#{arch}}}
70
+ cp(rpms, "pkg/pe/rpm/sles-11-#{arch}")
71
+ cp(srpms, "pkg/pe/rpm/sles-11-srpms")
72
+ noarch = rpms.exclude(/noarch/).empty?
73
+ rm_rf build_root
74
+ rm_rf work_dir
69
75
  end
70
- built_arch = arch
71
- cp rpms, "pkg/pe/rpm/sles-11-#{arch}"
72
- cp srpms, "pkg/pe/rpm/sles-11-srpms"
73
- noarch = rpms.exclude(/noarch/).empty?
74
- rm_rf build_root
75
- rm_rf work_dir
76
+ # See 30_metrics.rake to see what this is doing
77
+ add_metrics({ :dist => 'sles', :bench => bench }) if @build.benchmark
76
78
  else
77
- arches_to_copy_to = @sles_arch_repos.keys - [ built_arch ]
79
+ arches_to_copy_to = @build.sles_arch_repos.keys - [ built_arch ]
78
80
  arches_to_copy_to.each do |other_arch|
79
- cp FileList["pkg/pe/rpm/sles-11-#{built_arch}/*"], "pkg/pe/rpm/sles-11-#{other_arch}"
81
+ %x{mkdir -p pkg/pe/rpm/sles-11-#{other_arch}}
82
+ cp(FileList["pkg/pe/rpm/sles-11-#{built_arch}/*"], "pkg/pe/rpm/sles-11-#{other_arch}")
80
83
  end
81
84
  end
82
85
  end
86
+ post_metrics if @build.benchmark
83
87
  cd 'pkg/pe/rpm' do
84
88
  if File.exist?('sles-11-i586')
85
89
  mkdir_p 'sles-11-i386'
@@ -87,7 +91,7 @@ if @build_pe
87
91
  rm_rf 'sles-11-i586'
88
92
  end
89
93
  end
90
- if @team == 'release'
94
+ if @build.team == 'release'
91
95
  Rake::Task["pe:sign_rpms"].invoke
92
96
  end
93
97
  end
@@ -0,0 +1,5 @@
1
+ ##
2
+ # An alias from pe:tar to package:tar, for easier automation in jenkins.rake
3
+ namespace :pe do
4
+ task :local_tar => ["package:tar"]
5
+ end
@@ -7,10 +7,10 @@ namespace :pl do
7
7
  if confirm_ship(FileList["pkg/*.gem"])
8
8
  invoke_task("pl:ship_gem")
9
9
  end
10
- end if @build_gem
10
+ end if @build.build_gem
11
11
 
12
- desc "Release deb RCs, e.g. package:tar, pl:{deb_all_rc, sign_deb_changes, ship_debs}"
13
12
  task :release_deb_rc do
13
+ deprecate("pl:release_deb_rc", "pl:release_deb")
14
14
  load_keychain if has_tool('keychain')
15
15
  invoke_task("pl:deb_all_rc")
16
16
  invoke_task("pl:sign_deb_changes")
@@ -19,8 +19,18 @@ namespace :pl do
19
19
  end
20
20
  end
21
21
 
22
- desc "Release deb FINALs, e.g. package:tar, pl:{deb_all, sign_deb_changes, ship_debs}"
23
22
  task :release_deb_final do
23
+ deprecate("pl:release_deb_final", "pl:release_deb")
24
+ load_keychain if has_tool('keychain')
25
+ invoke_task("pl:deb_all")
26
+ invoke_task("pl:sign_deb_changes")
27
+ if confirm_ship(FileList["pkg/deb/**/*"])
28
+ invoke_task("pl:ship_debs")
29
+ end
30
+ end
31
+
32
+ desc "Release deb, e.g. package:tar, pl:{deb_all, sign_deb_changes, ship_debs}"
33
+ task :release_deb do
24
34
  load_keychain if has_tool('keychain')
25
35
  invoke_task("pl:deb_all")
26
36
  invoke_task("pl:sign_deb_changes")
@@ -29,29 +39,39 @@ namespace :pl do
29
39
  end
30
40
  end
31
41
 
32
- desc "Release rpm RCs, e.g. package:tar, pl:{mock_rc, sign_rpms, ship_rpms, update_yum_repo}"
33
42
  task :release_rpm_rc do
43
+ deprecate("pl:release_rpm_rc", "pl:release_rpm")
34
44
  invoke_task("pl:mock_rc")
35
45
  invoke_task("pl:sign_rpms")
36
46
  if confirm_ship(FileList["pkg/el/**/*", "pkg/fedora/**/*"])
37
47
  invoke_task("pl:ship_rpms")
38
- invoke_task("pl:remote_update_yum_repo")
48
+ invoke_task("pl:remote:update_yum_repo")
39
49
  end
40
50
  end
41
51
 
42
- desc "Release rpm FINALs, e.g. package:tar, pl:{mock_final, sign_rpms, ship_rpms, update_yum_repo}"
43
52
  task :release_rpm_final do
53
+ deprecate("pl:release_rpm_final", "pl:release_rpm")
44
54
  invoke_task("pl:mock_final")
45
55
  invoke_task("pl:sign_rpms")
46
56
  if confirm_ship(FileList["pkg/el/**/*", "pkg/fedora/**/*"])
47
57
  invoke_task("pl:ship_rpms")
48
- invoke_task("pl:remote_update_yum_repo")
58
+ invoke_task("pl:remote:update_yum_repo")
59
+ end
60
+ end
61
+
62
+ desc "Release rpms, e.g. package:tar, pl:{mock_all, sign_rpms, ship_rpms, update_yum_repo}"
63
+ task :release_rpm do
64
+ invoke_task("pl:mock_all")
65
+ invoke_task("pl:sign_rpms")
66
+ if confirm_ship(FileList["pkg/el/**/*", "pkg/fedora/**/*"])
67
+ invoke_task("pl:ship_rpms")
68
+ invoke_task("pl:remote:update_yum_repo")
49
69
  end
50
70
  end
51
71
 
52
- if File.exist?("#{ENV['HOME']}/.packaging/#{@builder_data_file}")
72
+ if File.exist?("#{ENV['HOME']}/.packaging")
53
73
  desc "Release tarball, e.g. package:tar, pl:{sign_tar, ship_tar}"
54
- task :release_tar => ['pl:fetch', 'pl:load_extras'] do
74
+ task :release_tar => 'pl:fetch' do
55
75
  invoke_task("package:tar")
56
76
  invoke_task("pl:sign_tar")
57
77
  if confirm_ship(FileList["pkg/*tar.gz*"])
@@ -60,15 +80,15 @@ namespace :pl do
60
80
  end
61
81
 
62
82
  desc "Release dmg, e.g. package:apple, pl:ship_dmg"
63
- task :release_dmg => ['pl:fetch', 'pl:load_extras'] do
83
+ task :release_dmg => 'pl:fetch' do
64
84
  sh "rvmsudo rake package:apple"
65
85
  if confirm_ship(FileList["pkg/apple/*.dmg"])
66
86
  Rake::Task["pl:ship_dmg"].execute
67
87
  end
68
- end if @build_dmg
88
+ end if @build.build_dmg
69
89
 
70
90
  desc "Release ips, e.g. pl:ips, pl:ship_ips"
71
- task :release_ips => ['pl:fetch', 'pl:load_extras'] do
91
+ task :release_ips => 'pl:fetch' do
72
92
  Rake::Task['pl:ips'].invoke
73
93
  Rake::Task['pl:ship_ips'].invoke
74
94
  end
@@ -1,112 +1,170 @@
1
1
  # Tasks for remote building on builder hosts
2
2
 
3
- if File.exist?("#{ENV['HOME']}/.packaging/#{@builder_data_file}")
3
+ if File.exist?("#{ENV['HOME']}/.packaging")
4
4
  namespace 'pl' do
5
- task :remote_build, :host, :treeish, :task, :tar do |t, args|
6
- host = args.host
7
- treeish = args.treeish
8
- task = args.task
9
- tar = args.tar
10
- remote_repo = remote_bootstrap(host, treeish, tar)
11
- STDOUT.puts "Beginning package build on #{host}"
12
- remote_ssh_cmd(host, "cd #{remote_repo} ; rake #{task} ANSWER_OVERRIDE=no")
13
- rsync_from("#{remote_repo}/pkg/", host, 'pkg/')
14
- remote_ssh_cmd(host, "rm -rf #{remote_repo}")
15
- STDOUT.puts "packages from #{host} staged in pkg/ directory"
16
- end
5
+ namespace :remote do
6
+ task :build, :host, :treeish, :task, :tar do |t, args|
7
+ if source_dirty?
8
+ warn "The source tree is dirty, e.g. there are uncommited changes. Please commit/discard changes and try again."
9
+ exit 1
10
+ end
11
+ host = args.host
12
+ treeish = args.treeish
13
+ task = args.task
14
+ tar = args.tar
15
+ remote_repo = remote_bootstrap(host, treeish, tar)
16
+ build_params = remote_buildparams(host, @build)
17
+ STDOUT.puts "Beginning package build on #{host}"
18
+ remote_ssh_cmd(host, "cd #{remote_repo} ; rake #{task} PARAMS_FILE=#{build_params} ANSWER_OVERRIDE=no PGUSER=#{ENV['PGUSER']} PGDATABASE=#{ENV['PGDATABASE']} PGHOST=#{ENV['PGHOST']}")
19
+ rsync_from("#{remote_repo}/pkg/", host, 'pkg/')
20
+ remote_ssh_cmd(host, "rm -rf #{remote_repo}")
21
+ remote_ssh_cmd(host, "rm #{build_params}")
22
+ STDOUT.puts "packages from #{host} staged in pkg/ directory"
23
+ end
17
24
 
18
- desc "Execute release_deb_rc full build set on remote debian build host"
19
- task :remote_deb_rc => ['pl:fetch', 'pl:load_extras'] do
20
- Rake::Task["pl:remote_build"].reenable
21
- Rake::Task["pl:remote_build"].invoke(@deb_build_host, 'HEAD', "pl:release_deb_rc COW='#{@cows}'")
22
- end
25
+ task :remote_deb_rc => 'pl:fetch' do
26
+ deprecate("pl:remote_deb_rc", "pl:remote:release_deb")
27
+ Rake::Task["pl:remote:build"].reenable
28
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:release_deb_rc")
29
+ end
23
30
 
24
- desc "Execute deb_all_rc build on remote debian build host (no signing)"
25
- task :remote_deb_rc_build => ['pl:fetch', 'pl:load_extras'] do
26
- Rake::Task["pl:remote_build"].reenable
27
- Rake::Task["pl:remote_build"].invoke(@deb_build_host, 'HEAD', "pl:deb_all_rc COW='#{@cows}'")
28
- end
31
+ task :remote_deb_rc_build => 'pl:fetch' do
32
+ deprecate("pl:remote_deb_rc_build", "pl:remote:deb_all")
33
+ Rake::Task["pl:remote:build"].reenable
34
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:deb_all_rc")
35
+ end
29
36
 
30
- desc "Execute release_deb_final full build set on remote debian build host"
31
- task :remote_deb_final => ['pl:fetch', 'pl:load_extras'] do
32
- Rake::Task["pl:remote_build"].reenable
33
- Rake::Task["pl:remote_build"].invoke(@deb_build_host, 'HEAD', "pl:release_deb_final COW='#{@cows}'")
34
- end
37
+ task :remote_deb_final => 'pl:fetch' do
38
+ deprecate("pl:remote_deb_final", "pl:remote:release_deb")
39
+ Rake::Task["pl:remote:build"].reenable
40
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:release_deb_final")
41
+ end
35
42
 
36
- desc "Execute deb_all on remote debian build host (no signing)"
37
- task :remote_deb_final_build => ['pl:fetch', 'pl:load_extras'] do
38
- Rake::Task["pl:remote_build"].reenable
39
- Rake::Task["pl:remote_build"].invoke(@deb_build_host, 'HEAD', "pl:deb_all COW='#{@cows}'")
40
- end
43
+ task :remote_deb_final_build => 'pl:fetch' do
44
+ deprecate("pl:remote_deb_final_build", "pl:remote:deb_all")
45
+ Rake::Task["pl:remote:build"].reenable
46
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:deb_all")
47
+ end
41
48
 
42
- desc "Execute release_rpm_rc full build set on remote rpm build host"
43
- task :remote_rpm_rc => ['pl:fetch', 'pl:load_extras'] do
44
- Rake::Task["pl:remote_build"].reenable
45
- Rake::Task["pl:remote_build"].invoke(@rpm_build_host, 'HEAD', "pl:release_rpm_rc MOCK='#{@rc_mocks}'")
46
- end
49
+ desc "Execute pl:deb (single default cow deb package) on remote debian build host (no signing)"
50
+ task :deb => 'pl:fetch' do
51
+ Rake::Task["pl:remote:build"].reenable
52
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:deb")
53
+ end
47
54
 
48
- desc "Execute mock_rc on remote rpm build host (no signing)"
49
- task :remote_rpm_rc_build => ['pl:fetch', 'pl:load_extras'] do
50
- Rake::Task["pl:remote_build"].reenable
51
- Rake::Task["pl:remote_build"].invoke(@rpm_build_host, 'HEAD', "pl:mock_rc MOCK='#{@rc_mocks}'")
52
- end
55
+ desc "Execute pl:deb_all on remote debian build host (no signing)"
56
+ task :deb_all => 'pl:fetch' do
57
+ Rake::Task["pl:remote:build"].reenable
58
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:deb_all")
59
+ end
53
60
 
54
- desc "Execute release_rpm_final full build set on remote rpm build host"
55
- task :remote_rpm_final => ['pl:fetch', 'pl:load_extras'] do
56
- Rake::Task["pl:remote_build"].reenable
57
- Rake::Task["pl:remote_build"].invoke(@rpm_build_host, 'HEAD', "pl:release_rpm_final MOCK='#{@final_mocks}'")
58
- end
61
+ desc "Execute remote pl:release_deb_all full build set on remote debian build host"
62
+ task :release_deb => 'pl:fetch' do
63
+ Rake::Task["pl:remote:build"].reenable
64
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pl:release_deb")
65
+ end
59
66
 
60
- desc "Execute mock_final on remote rpm build host (no signing)"
61
- task :remote_mock_final => ['pl:fetch', 'pl:load_extras'] do
62
- Rake::Task["pl:remote_build"].reenable
63
- Rake::Task["pl:remote_build"].invoke(@rpm_build_host, 'HEAD', "pl:mock_final MOCK='#{@final_mocks}'")
64
- end
67
+ task :remote_rpm_rc => 'pl:fetch' do
68
+ deprecate("pl:remote_rpm_rc", "pl:remote:release_rpm")
69
+ Rake::Task["pl:remote:build"].reenable
70
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:release_rpm_rc")
71
+ end
72
+
73
+ task :remote_rpm_rc_build => 'pl:fetch' do
74
+ deprecate("pl:remote_rpm_rc_build", "pl:remote:mock_all")
75
+ Rake::Task["pl:remote:build"].reenable
76
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:mock_rc")
77
+ end
78
+
79
+ task :remote_rpm_final => 'pl:fetch' do
80
+ deprecate("pl:remote_rpm_final", "pl:remote:release_rpm")
81
+ Rake::Task["pl:remote:build"].reenable
82
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:release_rpm_final")
83
+ end
84
+
85
+ desc "Execute remote pl:release_rpm full build set on remote rpm build host"
86
+ task :release_rpm => 'pl:fetch' do
87
+ Rake::Task["pl:remote:build"].reenable
88
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:release_rpm")
89
+ end
90
+
91
+ task :remote_mock_final => 'pl:fetch' do
92
+ deprecate("pl:remote_mock_final", "pl:remote:mock_all")
93
+ Rake::Task["pl:remote:build"].reenable
94
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:mock_final")
95
+ end
96
+
97
+ desc "Execute pl:mock (single default mock package) on remote rpm build host (no signing)"
98
+ task :mock => 'pl:fetch' do
99
+ Rake::Task["pl:remote:build"].reenable
100
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:mock")
101
+ end
102
+
103
+ desc "Execute pl:mock_all on remote rpm build host (no signing)"
104
+ task :mock_all => 'pl:fetch' do
105
+ Rake::Task["pl:remote:build"].reenable
106
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pl:mock_all")
107
+ end
108
+
109
+ desc "Execute pl:ips on remote ips build host"
110
+ task :ips => 'pl:fetch' do
111
+ Rake::Task["pl:remote:build"].reenable
112
+ Rake::Task["pl:remote:build"].invoke(@build.ips_build_host, 'HEAD', 'pl:ips', 'gtar')
113
+ end if @build.build_ips
114
+
115
+ desc "Execute package:apple on remote apple build host"
116
+ task :dmg => 'pl:fetch' do
117
+ # Because we use rvmsudo for apple, we end up replicating the :remote_build task
118
+ host = @build.osx_build_host
119
+ treeish = 'HEAD'
120
+ task = "package:apple"
121
+ remote_repo = remote_bootstrap(host, treeish)
122
+ build_params = remote_buildparams(host, @build)
123
+ puts "Beginning package build on #{host}"
124
+ remote_ssh_cmd(host, "cd #{remote_repo} ; rvmsudo rake #{task} PARAMS_FILE=#{build_params} PGUSER=#{ENV['PGUSER']} PGDATABASE=#{ENV['PGDATABASE']} PGHOST=#{ENV['PGHOST']}")
125
+ rsync_from("#{remote_repo}/pkg/apple", host, 'pkg/')
126
+ remote_ssh_cmd(host, "sudo rm -rf #{remote_repo}")
127
+ STDOUT.puts "packages from #{host} staged in pkg/ directory"
128
+ end if @build.build_dmg
129
+ end # remote namespace
65
130
 
66
- desc "Execute pl:ips on remote ips build host"
67
- task :remote_ips => ['pl:fetch', 'pl:load_extras'] do
68
- Rake::Task["pl:remote_build"].reenable
69
- Rake::Task["pl:remote_build"].invoke(@ips_build_host, 'HEAD', 'pl:ips', 'gtar')
70
- end if @build_ips
71
-
72
- desc "Execute package:apple on remote apple build host"
73
- task :remote_dmg => ['pl:fetch', 'pl:load_extras'] do
74
- # Because we use rvmsudo for apple, we end up replicating the :remote_build task
75
- host = @osx_build_host
76
- treeish = 'HEAD'
77
- task = "package:apple"
78
- remote_repo = remote_bootstrap(host, treeish)
79
- puts "Beginning package build on #{host}"
80
- remote_ssh_cmd(host, "cd #{remote_repo} ; rvmsudo rake #{task}")
81
- rsync_from("#{remote_repo}/pkg/apple", host, 'pkg/')
82
- remote_ssh_cmd(host, "sudo rm -rf #{remote_repo}")
83
- STDOUT.puts "packages from #{host} staged in pkg/ directory"
84
- end if @build_dmg
85
-
86
- desc "UBER RC build: build and ship RC tar, gem (as applicable), remote dmg, remote deb, remote rpm"
87
131
  task :uber_rc do
88
- Rake::Task["package:gem"].invoke if @build_gem
132
+ deprecate("pl:uber_rc", "pl:uber_release")
133
+ Rake::Task["package:gem"].invoke if @build.build_gem
89
134
  Rake::Task["pl:remote_deb_rc"].invoke
90
135
  Rake::Task["pl:remote_rpm_rc"].execute
91
- Rake::Task["pl:remote_dmg"].execute if @build_dmg
136
+ Rake::Task["pl:remote:dmg"].execute if @build.build_dmg
92
137
  Rake::Task["package:tar"].execute
93
138
  Rake::Task["pl:sign_tar"].invoke
94
139
  Rake::Task["pl:uber_ship"].execute
95
- Rake::Task["pl:remote_freight_devel"].invoke
96
- Rake::Task["pl:remote_update_yum_repo"].invoke
140
+ Rake::Task["pl:remote:freight"].invoke
141
+ Rake::Task["pl:remote:update_yum_repo"].invoke
97
142
  end
98
143
 
99
- desc "UBER FINAL build: build and ship FINAL tar, gem (as applicable), remote dmg, remote deb, remote rpm"
100
144
  task :uber_final do
101
- Rake::Task["package:gem"].invoke if @build_gem
145
+ deprecate("pl:uber_final", "pl:uber_release")
146
+ Rake::Task["package:gem"].invoke if @build.build_gem
102
147
  Rake::Task["pl:remote_deb_final"].invoke
103
148
  Rake::Task["pl:remote_rpm_final"].execute
104
- Rake::Task["pl:remote_dmg"].execute if @build_dmg
149
+ Rake::Task["pl:remote:dmg"].execute if @build.build_dmg
150
+ Rake::Task["package:tar"].execute
151
+ Rake::Task["pl:sign_tar"].invoke
152
+ Rake::Task["pl:uber_ship"].execute
153
+ Rake::Task["pl:remote:freight"].invoke
154
+ Rake::Task["pl:remote:update_yum_repo"].invoke
155
+ end
156
+
157
+ desc "UBER build: build, sign and ship tar, gem (as applicable), remote dmg, remote deb, remote rpm"
158
+ task :uber_release do
159
+ Rake::Task["package:gem"].invoke if @build.build_gem
160
+ Rake::Task["pl:remote:release_deb"].invoke
161
+ Rake::Task["pl:remote:release_rpm"].execute
162
+ Rake::Task["pl:remote:dmg"].execute if @build.build_dmg
105
163
  Rake::Task["package:tar"].execute
106
164
  Rake::Task["pl:sign_tar"].invoke
107
165
  Rake::Task["pl:uber_ship"].execute
108
- Rake::Task["pl:remote_freight_final"].invoke
109
- Rake::Task["pl:remote_update_yum_repo"].invoke
166
+ Rake::Task["pl:remote:freight"].invoke
167
+ Rake::Task["pl:remote:update_yum_repo"].invoke
110
168
  end
111
169
  end
112
170
  end