puppet 2.7.22 → 2.7.23

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 (55) hide show
  1. data/CHANGELOG +21 -0
  2. data/Rakefile +0 -2
  3. data/ext/build_defaults.yaml +1 -1
  4. data/ext/packaging/README.md +88 -33
  5. data/ext/packaging/packaging.rake +45 -0
  6. data/ext/packaging/spec/tasks/build_object_spec.rb +2 -0
  7. data/ext/packaging/tasks/00_utils.rake +94 -54
  8. data/ext/packaging/tasks/10_setupvars.rake +40 -28
  9. data/ext/packaging/tasks/apple.rake +20 -27
  10. data/ext/packaging/tasks/build.rake +3 -8
  11. data/ext/packaging/tasks/deb.rake +12 -36
  12. data/ext/packaging/tasks/deb_repos.rake +28 -36
  13. data/ext/packaging/tasks/fetch.rake +1 -2
  14. data/ext/packaging/tasks/jenkins.rake +22 -56
  15. data/ext/packaging/tasks/jenkins_dynamic.rake +111 -0
  16. data/ext/packaging/tasks/mock.rake +101 -56
  17. data/ext/packaging/tasks/pe_deb.rake +5 -7
  18. data/ext/packaging/tasks/pe_remote.rake +30 -42
  19. data/ext/packaging/tasks/pe_rpm.rake +3 -11
  20. data/ext/packaging/tasks/pe_ship.rake +14 -18
  21. data/ext/packaging/tasks/pe_sign.rake +11 -0
  22. data/ext/packaging/tasks/pe_tar.rake +1 -1
  23. data/ext/packaging/tasks/release.rake +0 -6
  24. data/ext/packaging/tasks/remote_build.rake +1 -13
  25. data/ext/packaging/tasks/retrieve.rake +1 -1
  26. data/ext/packaging/tasks/rpm.rake +15 -10
  27. data/ext/packaging/tasks/rpm_repos.rake +45 -56
  28. data/ext/packaging/tasks/ship.rake +46 -37
  29. data/ext/packaging/tasks/sign.rake +22 -14
  30. data/ext/packaging/tasks/tar.rake +1 -1
  31. data/ext/packaging/tasks/template.rake +1 -1
  32. data/ext/packaging/templates/README +1 -0
  33. data/ext/packaging/templates/downstream.xml.erb +32 -0
  34. data/ext/packaging/templates/packaging.xml.erb +182 -0
  35. data/ext/packaging/templates/repo.xml.erb +93 -0
  36. data/lib/puppet.rb +2 -0
  37. data/lib/puppet/file_system.rb +3 -0
  38. data/lib/puppet/file_system/path_pattern.rb +97 -0
  39. data/lib/puppet/module.rb +25 -4
  40. data/lib/puppet/module_tool/applications/unpacker.rb +5 -1
  41. data/lib/puppet/parser/files.rb +20 -15
  42. data/lib/puppet/parser/parser_support.rb +10 -1
  43. data/lib/puppet/parser/type_loader.rb +48 -28
  44. data/lib/puppet/version.rb +1 -1
  45. data/spec/unit/file_system/path_pattern_spec.rb +139 -0
  46. data/spec/unit/module_spec.rb +8 -1
  47. data/spec/unit/module_tool/applications/unpacker_spec.rb +6 -0
  48. data/spec/unit/parser/files_spec.rb +6 -67
  49. data/spec/unit/parser/parser_spec.rb +15 -5
  50. data/spec/unit/parser/type_loader_spec.rb +14 -33
  51. data/spec/unit/resource/type_collection_spec.rb +39 -55
  52. metadata +11 -5
  53. data/Gemfile.lock +0 -44
  54. data/ext/packaging/tasks/pe_sles.rake +0 -101
  55. data/ext/packaging/tasks/pre_tasks.rake +0 -0
@@ -0,0 +1,111 @@
1
+ # Rake Task to dynamically create a Jenkins job to model the
2
+ # pl:jenkins:uber_build set of tasks in a Matrix job where each cell is an
3
+ # individual build to be run. This would be nice if we only had to create one job,
4
+ # but alas, we're actually creating three jobs.
5
+ # 1) a packaging job that builds the packages
6
+ # |
7
+ # V
8
+ # 2) a repo creation job that creates repos from those packages
9
+ # |
10
+ # V
11
+ # 3) (optional) a job to proxy the downstream job passed in via DOWNSTREAM_JOB
12
+ #
13
+
14
+ namespace :pl do
15
+ namespace :jenkins do
16
+ desc "Dynamic Jenkins UBER build: Build all the things with ONE job"
17
+ task :uber_build => "pl:fetch" do
18
+ # If we have a dirty source, bail, because changes won't get reflected in
19
+ # the package builds
20
+ fail_on_dirty_source
21
+
22
+ # Use JSON to parse the json part of the submission, so we want to fail
23
+ # here also if JSON isn't available
24
+ require_library_or_fail 'json'
25
+
26
+ # The uber_build.xml.erb file is an XML erb template that will define a
27
+ # job in Jenkins with all of the appropriate tasks
28
+ work_dir = get_temp
29
+ template_dir = File.join(File.dirname(__FILE__), '..', 'templates')
30
+ templates = ['repo.xml.erb', 'packaging.xml.erb']
31
+ templates.unshift('downstream.xml.erb') if ENV['DOWNSTREAM_JOB']
32
+
33
+ # Generate an XML file for every job configuration erb and attempt to
34
+ # create a jenkins job from that XML config
35
+ templates.each do |t|
36
+ erb_file = File.join(template_dir, t)
37
+ xml_file = File.join(work_dir, t.gsub('.erb', ''))
38
+ erb(erb_file, xml_file)
39
+ job_name = "#{@build.project}-#{t.gsub('.xml.erb','')}-#{@build.build_date}-#{@build.ref}"
40
+ puts "Checking for existence of #{job_name}..."
41
+ if jenkins_job_exists?(job_name)
42
+ raise "Job #{job_name} already exists on #{@build.jenkins_build_host}"
43
+ else
44
+ retry_on_fail(:times => 3) do
45
+ url = create_jenkins_job(job_name, xml_file)
46
+ puts "Verifying job created successfully..."
47
+ unless jenkins_job_exists?(job_name)
48
+ raise "Unable to verify Jenkins job, trying again..."
49
+ end
50
+ puts "Jenkins job created at #{url}"
51
+ end
52
+ end
53
+ end
54
+ rm_r work_dir
55
+ packaging_name = "#{@build.project}-packaging-#{@build.build_date}-#{@build.ref}"
56
+ invoke_task("pl:jenkins:trigger_dynamic_job", packaging_name)
57
+ end
58
+
59
+ # Task to trigger the jenkins job we just created. This uses a lot of the
60
+ # same logic in jenkins.rake, with different parameters.
61
+ # TODO make all this replicated code a better, more abstract method
62
+ task :trigger_dynamic_job, :name do |t, args|
63
+ name = args.name
64
+
65
+ properties = @build.params_to_yaml
66
+ bundle = git_bundle('HEAD')
67
+
68
+ # Construct the parameters, which is an array of hashes we turn into JSON
69
+ parameters = [{ "name" => "BUILD_PROPERTIES", "file" => "file0" },
70
+ { "name" => "PROJECT_BUNDLE", "file" => "file1" },
71
+ { "name" => "PROJECT", "value" => "#{@build.project}" }]
72
+
73
+ # Contruct the json string
74
+ json = JSON.generate("parameter" => parameters)
75
+
76
+ # The args array that holds all of the arguments we pass
77
+ # to the curl utility method.
78
+ curl_args = [
79
+ "-Fname=BUILD_PROPERTIES", "-Ffile0=@#{properties}",
80
+ "-Fname=PROJECT_BUNDLE" , "-Ffile1=@#{bundle}",
81
+ "-Fname=PROJECT" , "-Fvalue=#{@build.project}",
82
+ "-FSubmit=Build",
83
+ "-Fjson=#{json.to_json}",
84
+ ]
85
+
86
+ # Contstruct the job url
87
+ trigger_url = "#{@build.jenkins_build_host}/job/#{name}/build"
88
+
89
+ if curl_form_data(trigger_url, curl_args)
90
+ print_url_info("#{@build.jenkins_build_host}/job/#{name}")
91
+ puts "Your packages will be available at #{@build.distribution_server}:#{@build.jenkins_repo_path}/#{@build.project}/#{@build.ref}"
92
+ else
93
+ fail "An error occurred submitting the job to jenkins. Take a look at the preceding http response for more info."
94
+ end
95
+
96
+ # Clean up after ourselves
97
+ rm bundle
98
+ rm properties
99
+ end
100
+ end
101
+ end
102
+
103
+ namespace :pe do
104
+ namespace :jenkins do
105
+ desc "Dynamic Jenkins UBER build: Build all the things with ONE job"
106
+ task :uber_build do
107
+ check_var("PE_VER", @build.pe_version)
108
+ invoke_task("pl:jenkins:uber_build")
109
+ end
110
+ end
111
+ end
@@ -17,40 +17,50 @@
17
17
  # pkg/<dist>-<version>-<arch>/*.rpm
18
18
  # e.g.,
19
19
  # pkg/el-5-i386/*.rpm
20
-
21
- def mock(mock_config, srpm)
22
- configdir = nil
20
+ def mock_artifact(mock_config, cmd_args)
23
21
  unless mock = find_tool('mock')
24
- warn "mock is required for building rpms with mock. Please install mock and try again."
25
- exit 1
22
+ raise "mock is required for building srpms with mock. Please install mock and try again."
26
23
  end
27
- if @build.random_mockroot
28
- basedir = get_temp
29
- chown("#{ENV['USER']}", "mock", basedir)
30
- # Mock requires the sticky bit be set on the basedir
31
- chmod(02775, basedir)
32
- mockfile = File.join('/', 'etc', 'mock', "#{mock_config}.cfg")
33
- puts "Setting mock basedir to #{basedir}"
34
- config = mock_with_basedir(mockfile, basedir)
35
- configdir = setup_mock_config_dir(config)
36
- # Clean up the new mock config
37
- rm_r File.dirname(config)
24
+ randomize = @build.random_mockroot
25
+ configdir = nil
26
+ basedir = File.join('var', 'lib', 'mock')
27
+
28
+ if randomize
29
+ basedir, configdir = randomize_mock_config_dir(mock_config)
38
30
  configdir_arg = " --configdir #{configdir}"
39
- mock << configdir_arg
40
31
  end
41
- sh "#{mock} -r #{mock_config} #{srpm}"
32
+
33
+ sh "#{mock} -r #{mock_config} #{configdir_arg} #{cmd_args}"
42
34
  # Clean up the configdir
43
35
  rm_r configdir unless configdir.nil?
44
36
 
45
- basedir
37
+ # Return a FileList of the build artifacts
38
+ FileList[File.join(basedir, mock_config, 'result','*.rpm')]
46
39
  end
47
40
 
48
- def srpm_file
49
- srpm = Dir["pkg/srpm/*.rpm"][0]
50
- check_file(srpm)
51
- srpm
41
+ # Use mock to build an SRPM
42
+ # Return the path to the srpm
43
+ def mock_srpm(mock_config, spec, sources, defines=nil)
44
+ cmd_args = "--buildsrpm #{defines} --sources #{sources} --spec #{spec}"
45
+ srpms = mock_artifact(mock_config, cmd_args)
46
+
47
+ unless srpms.size == 1
48
+ fail "#{srpms} contains an unexpected number of artifacts."
49
+ end
50
+ srpms[0]
52
51
  end
53
52
 
53
+ # Use mock to build rpms from an srpm
54
+ # Return a FileList containing the built RPMs
55
+ def mock_rpm(mock_config, srpm)
56
+ cmd_args = " #{srpm}"
57
+ mock_artifact(mock_config, cmd_args)
58
+ end
59
+
60
+ # Determine the "family" of the target distribution based on the mock config name,
61
+ # e.g. pupent-3.0-el5-i386 = "el"
62
+ # and pl-fedora-17-i386 = "fedora"
63
+ #
54
64
  def mock_el_family(mock_config)
55
65
  if @build.build_pe
56
66
  family = mock_config.split('-')[2][/[a-z]+/]
@@ -69,6 +79,10 @@ def mock_el_family(mock_config)
69
79
  family
70
80
  end
71
81
 
82
+ # Determine the major version of the target distribution based on the mock config name,
83
+ # e.g. pupent-3.0-el5-i386 = "5"
84
+ # and "pl-fedora-17-i386" = "17"
85
+ #
72
86
  def mock_el_ver(mock_config)
73
87
  if @build.build_pe
74
88
  version = mock_config.split('-')[2][/[0-9]+/]
@@ -86,32 +100,50 @@ def mock_el_ver(mock_config)
86
100
  version
87
101
  end
88
102
 
89
- def mock_arch(mock_config)
90
- if @build.build_pe
91
- arch = mock_config.split('-')[3]
92
- else
93
- arch = mock_config.split('-')[2]
103
+ # Determine the appropriate rpm macro definitions based on the mock config name
104
+ # Return a string of space separated macros prefixed with --define
105
+ #
106
+ def mock_defines(mock_config)
107
+ family = mock_el_family(mock_config)
108
+ version = mock_el_ver(mock_config)
109
+ defines = ""
110
+ if version == "5" or family == "sles"
111
+ defines = %Q{--define "%dist .#{family}#{version}" \
112
+ --define "_source_filedigest_algorithm 1" \
113
+ --define "_binary_filedigest_algorithm 1" \
114
+ --define "_binary_payload w9.gzdio" \
115
+ --define "_source_payload w9.gzdio" \
116
+ --define "_default_patch_fuzz 2"}
94
117
  end
118
+ defines
95
119
  end
96
120
 
97
- def build_rpm_with_mock(mocks, is_rc)
121
+ def build_rpm_with_mock(mocks)
98
122
  mocks.split(' ').each do |mock_config|
99
123
  family = mock_el_family(mock_config)
100
124
  version = mock_el_ver(mock_config)
101
- arch = mock_arch(mock_config)
102
- subdir = is_rc ? 'devel' : 'products'
125
+ subdir = is_rc? ? 'devel' : 'products'
103
126
  bench = Benchmark.realtime do
104
- resultdir = mock(mock_config, srpm_file)
105
- result = "#{resultdir}/#{mock_config}/result/*.rpm"
127
+ # Set up the rpmbuild dir in a temp space, with our tarball and spec
128
+ workdir = prep_rpm_build_dir
129
+ spec = Dir.glob(File.join(workdir, "SPECS", "*.spec"))[0]
130
+ sources = File.join(workdir, "SOURCES")
131
+ defines = mock_defines(mock_config)
132
+
133
+ # Build the srpm inside a mock chroot
134
+ srpm = mock_srpm(mock_config, spec, sources, defines)
106
135
 
107
- Dir[result].each do |rpm|
136
+ # Now that we have the srpm, build the rpm in a mock chroot
137
+ rpms = mock_rpm(mock_config, srpm)
138
+
139
+ rpms.each do |rpm|
108
140
  rpm.strip!
109
141
  unless ENV['RC_OVERRIDE'] == '1'
110
- if is_rc == FALSE and rpm =~ /[0-9]+rc[0-9]+\./
111
- puts "It looks like you might be trying to ship an RC to the production repos. Leaving rpm in #{result}. Pass RC_OVERRIDE=1 to override."
142
+ if is_rc? == FALSE and rpm =~ /[0-9]+rc[0-9]+\./
143
+ puts "It looks like you might be trying to ship an RC to the production repos. Leaving #{rpm}. Pass RC_OVERRIDE=1 to override."
112
144
  next
113
- elsif is_rc and rpm !~ /[0-9]+rc[0-9]+\./
114
- puts "It looks like you might be trying to ship a production release to the development repos. Leaving rpm in #{result}. Pass RC_OVERRIDE=1 to override."
145
+ elsif is_rc? and rpm !~ /[0-9]+rc[0-9]+\./
146
+ puts "It looks like you might be trying to ship a production release to the development repos. Leaving #{rpm}. Pass RC_OVERRIDE=1 to override."
115
147
  next
116
148
  end
117
149
  end
@@ -154,9 +186,11 @@ def build_rpm_with_mock(mocks, is_rc)
154
186
  if @build.random_mockroot
155
187
  %x{sudo -n echo 'Cleaning build root.'}
156
188
  if $?.success?
157
- sh "sudo -n rm -r #{resultdir}" unless resultdir.nil?
189
+ sh "sudo -n rm -r #{File.dirname(srpm)}" unless File.dirname(srpm).nil?
190
+ sh "sudo -n rm -r #{File.dirname(rpms[0])}" unless File.dirname(rpms[0]).nil?
191
+ sh "sudo -n rm -r #{workdir}" unless workdir.nil?
158
192
  else
159
- warn "Couldn't clean #{resultdir} without sudo. Leaving."
193
+ warn "Couldn't clean rpm build areas without sudo. Leaving."
160
194
  end
161
195
  end
162
196
  end
@@ -198,30 +232,41 @@ def setup_mock_config_dir(mock)
198
232
  tempdir
199
233
  end
200
234
 
235
+ # Create a mock config file from an existing one, except insert the 'basedir'
236
+ # option. 'basedir' will be set to a random directory we create. Move the new
237
+ # mock config and the required default mock settings files into a new config
238
+ # dir to pass to mock. Return the path to the config dir.
239
+ #
240
+ def randomize_mock_config_dir(mock_config)
241
+ # basedir will be the location of our temporary mock root
242
+ basedir = get_temp
243
+ chown("#{ENV['USER']}", "mock", basedir)
244
+ # Mock requires the sticky bit be set on the basedir
245
+ chmod(02775, basedir)
246
+ mockfile = File.join('/', 'etc', 'mock', "#{mock_config}.cfg")
247
+ puts "Setting mock basedir to #{basedir}"
248
+ # Create a new mock config file with 'basedir' set to our basedir
249
+ config = mock_with_basedir(mockfile, basedir)
250
+ # Setup a mock config dir, copying in our mock config and logging.ini etc
251
+ configdir = setup_mock_config_dir(config)
252
+ # Clean up the directory with the temporary mock config
253
+ rm_r File.dirname(config)
254
+ return basedir, configdir
255
+ end
256
+
257
+
201
258
  namespace :pl do
202
259
  desc "Use default mock to make a final rpm, keyed to PL infrastructure, pass MOCK to specify config"
203
- task :mock => "package:srpm" do
260
+ task :mock => "package:tar" do
204
261
  # If default mock isn't specified, just take the first one in the @build.final_mocks list
205
262
  @build.default_mock ||= @build.final_mocks.split(' ')[0]
206
- build_rpm_with_mock(@build.default_mock, is_rc?)
207
- post_metrics if @build.benchmark
208
- end
209
-
210
- task :mock_final => "package:srpm" do
211
- deprecate("pl:mock_final", "pl:mock_all")
212
- build_rpm_with_mock(@build.final_mocks, FALSE)
213
- post_metrics if @build.benchmark
214
- end
215
-
216
- task :mock_rc => "package:srpm" do
217
- deprecate("pl:mock_rc", "pl:mock_all")
218
- build_rpm_with_mock(@build.rc_mocks, TRUE)
263
+ build_rpm_with_mock(@build.default_mock)
219
264
  post_metrics if @build.benchmark
220
265
  end
221
266
 
222
267
  desc "Use specified mocks to make rpms, keyed to PL infrastructure, pass MOCK to specifiy config"
223
- task :mock_all => "package:srpm" do
224
- build_rpm_with_mock(@build.final_mocks, is_rc?)
268
+ task :mock_all => "package:tar" do
269
+ build_rpm_with_mock(@build.final_mocks)
225
270
  post_metrics if @build.benchmark
226
271
  end
227
272
  end
@@ -1,14 +1,12 @@
1
- # For PE, the natural default tasks are the remote tasks, rather than
2
- # the local ones, in reflection of which will be most ideal for PE devs.
3
- # e.g., pe:local_deb is the task to build a deb on the local host,
4
- # while pe:deb is the task for building on the remote builder host
5
-
1
+ # "Alias" tasks for PE - these just point at the standard pl: tasks. They exist
2
+ # for ease of aggregation with PE-specific tasks that _are_ actually different
3
+ # from their "pl" counterparts
6
4
  if @build.build_pe
7
5
  namespace :pe do
8
6
  desc "Create a PE deb from this repo using the default cow #{@build.default_cow}."
9
- task :local_deb => "pl:deb"
7
+ task :deb => "pl:deb"
10
8
 
11
9
  desc "Create PE debs from this git repository using all cows specified in build_defaults yaml"
12
- task :local_deb_all => "pl:deb_all"
10
+ task :deb_all => "pl:deb_all"
13
11
  end
14
12
  end
@@ -1,51 +1,39 @@
1
- # For PE, the natural default tasks are the remote tasks, rather than
2
- # the local ones, in reflection of which will be most ideal for PE devs.
3
- # e.g., pe:local_deb is the task to build a deb on the local host,
4
- # while pe:deb is the task for building on the remote builder host
5
-
1
+ # PE remote tasks
2
+ # We keep these around for backwards compatibility and as a backup in case the
3
+ # jenkins infrastructure fails. We hide them to reduce task clutter
6
4
  if @build.build_pe
7
5
  namespace :pe do
8
- desc "Execute remote debian build using default cow on builder and retrieve package"
9
- task :deb => 'pl:fetch' do
10
- ENV['PE_VER'] ||= @build.pe_version
11
- check_var('PE_VER', ENV['PE_VER'])
12
- Rake::Task["pl:remote:build"].reenable
13
- Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pe:local_deb PE_BUILD=#{@build.build_pe} TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
14
- end
15
-
16
- desc "Execute remote debian build using ALL cows on builder and retrieve packages"
17
- task :deb_all => 'pl:fetch' do
18
- ENV['PE_VER'] ||= @build.pe_version
19
- check_var('PE_VER', ENV['PE_VER'])
20
- Rake::Task["pl:remote:build"].reenable
21
- Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pe:local_deb_all PE_BUILD=#{@build.build_pe} COW='#{@build.cows}' TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
22
- end
6
+ namespace :remote do
7
+ task :deb => 'pl:fetch' do
8
+ ENV['PE_VER'] ||= @build.pe_version
9
+ check_var('PE_VER', ENV['PE_VER'])
10
+ Rake::Task["pl:remote:build"].reenable
11
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pe:deb PE_BUILD=#{@build.build_pe} TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
12
+ end
23
13
 
24
- desc "Execute remote rpm build using default mock on builder and retrieve package"
25
- task :mock => 'pl:fetch' do
26
- ENV['PE_VER'] ||= @build.pe_version
27
- Rake::Task["pl:remote:build"].reenable
28
- Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pe:local_mock PE_BUILD=#{@build.build_pe} TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
29
- end
14
+ task :deb_all => 'pl:fetch' do
15
+ ENV['PE_VER'] ||= @build.pe_version
16
+ check_var('PE_VER', ENV['PE_VER'])
17
+ Rake::Task["pl:remote:build"].reenable
18
+ Rake::Task["pl:remote:build"].invoke(@build.deb_build_host, 'HEAD', "pe:deb_all PE_BUILD=#{@build.build_pe} COW='#{@build.cows}' TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
19
+ end
30
20
 
31
- desc "Execute remote rpm build with ALL mocks on builder and retrieve packages"
32
- task :mock_all => 'pl:fetch' do
33
- ENV['PE_VER'] ||= @build.pe_version
34
- Rake::Task["pl:remote:build"].reenable
35
- Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pe:local_mock_all PE_BUILD=#{@build.build_pe} MOCK='#{@build.final_mocks}' TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
36
- end
21
+ task :mock => 'pl:fetch' do
22
+ ENV['PE_VER'] ||= @build.pe_version
23
+ Rake::Task["pl:remote:build"].reenable
24
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pe:mock PE_BUILD=#{@build.build_pe} TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
25
+ end
37
26
 
38
- desc "Execute remote sles rpm build and retrieve package"
39
- task :sles => 'pl:fetch' do
40
- ENV['PE_VER'] ||= @build.pe_version
41
- Rake::Task["pl:remote:build"].reenable
42
- Rake::Task["pl:remote:build"].invoke(@build.sles_build_host, 'HEAD', "pe:local_sles PE_BUILD=#{@build.build_pe} TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
43
- end
27
+ task :mock_all => 'pl:fetch' do
28
+ ENV['PE_VER'] ||= @build.pe_version
29
+ Rake::Task["pl:remote:build"].reenable
30
+ Rake::Task["pl:remote:build"].invoke(@build.rpm_build_host, 'HEAD', "pe:mock_all PE_BUILD=#{@build.build_pe} MOCK='#{@build.final_mocks}' TEAM=#{@build.team} PE_VER=#{ENV['PE_VER']}")
31
+ end
44
32
 
45
- desc "Execute remote debian, el, and sles builds, sign, and ship pkgs"
46
- task :all => ['clean', 'pl:fetch'] do
47
- ['pe:deb_all', 'pe:mock_all', 'pe:sles', 'pe:ship_rpms', 'pe:ship_debs'].each do |task|
48
- Rake::Task[task].execute
33
+ task :all => ['clean', 'pl:fetch'] do
34
+ ['pe:remote:deb_all', 'pe:remote:mock_all', 'pe:ship_rpms', 'pe:ship_debs'].each do |task|
35
+ Rake::Task[task].execute
36
+ end
49
37
  end
50
38
  end
51
39
  end
@@ -1,21 +1,13 @@
1
1
  if @build.build_pe
2
2
  namespace :pe do
3
3
  desc "Build a PE rpm using rpmbuild (requires all BuildRequires, rpmbuild, etc)"
4
- task :local_rpm => "package:rpm"
4
+ task :rpm => "package:rpm"
5
5
 
6
6
  desc "Build rpms using ALL final mocks in build_defaults yaml, keyed to PL infrastructure, pass MOCK to override"
7
- task :local_mock_all => ["pl:fetch", "pl:mock_all"] do
8
- if @build.team == 'release'
9
- Rake::Task["pe:sign_rpms"].invoke
10
- end
11
- end
7
+ task :mock_all => ["pl:fetch", "pl:mock_all"]
12
8
 
13
9
  desc "Build a PE rpm using the default mock"
14
- task :local_mock => ["pl:fetch", "pl:mock"] do
15
- if @build.team == 'release'
16
- Rake::Task["pe:sign_rpms"].invoke
17
- end
18
- end
10
+ task :mock => ["pl:fetch", "pl:mock"]
19
11
  end
20
12
  end
21
13