packaging 0.99.17 → 0.99.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +63 -117
- data/lib/packaging/platforms.rb +8 -0
- data/lib/packaging/util/net.rb +4 -10
- data/tasks/00_utils.rake +0 -5
- data/tasks/jenkins.rake +5 -5
- data/tasks/nightly_repos.rake +3 -7
- data/tasks/sign.rake +3 -7
- data/templates/packaging.xml.erb +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ec3366d62f59d0ab1c9d41e7bb7a1c2540d6a5412dd48729045e890caa540280
|
4
|
+
data.tar.gz: 04ccb4cfa6e2d73a457a9ca0a442fe251b85269e7d67ea51faa9ff1bf0f6f232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ea3362a6c806d3c16c0265ce756521a9644747f9beb2e3347e3f40d3d49ef494d1cb897b4ce3b465fb758d9640f721aaba38f375faa3d407cfaad1e51d40f04
|
7
|
+
data.tar.gz: f0e0e01efdd19e0a01f08f8651587d8430f32e34b9ea3413bb2fb67935f70ddce703d5a306c6c4d6b0c90d36882712a1d1119caf5493c9addcbff9a8e86ed2d3
|
data/README.md
CHANGED
@@ -36,12 +36,12 @@ as well as several closed-source projects, including
|
|
36
36
|
* console-auth
|
37
37
|
* console
|
38
38
|
|
39
|
-
Generally speaking, the packaging repo should be compatible with ruby
|
40
|
-
|
41
|
-
do a `
|
42
|
-
|
43
|
-
|
44
|
-
namespaced tasks.
|
39
|
+
Generally speaking, the packaging repo should be compatible with ruby >= 2.0.0
|
40
|
+
rake ~> 12.3. To pull the packaging tasks into your source repo,
|
41
|
+
do a `bundle install`. This will install the packaging gem and all its
|
42
|
+
dependencies. Packaging's rake tasks will be made available by running any rake
|
43
|
+
command, e.g. `bundle exec rake -T`. The tasks are generally grouped into two
|
44
|
+
categories, `package:` namespaced tasks and `pl:` namespaced tasks.
|
45
45
|
|
46
46
|
## `package:` tasks
|
47
47
|
`package:` namespaced tasks are general purpose tasks that are set up to use
|
@@ -51,7 +51,8 @@ the building host, and any dynamically generated dependencies may result in
|
|
51
51
|
packages that are only suitable for the OS/version of the build host. However,
|
52
52
|
for rolling one's own debs and rpms or for use in environments without many
|
53
53
|
OSes/versions, this may work just fine. To build an rpm using the packaging
|
54
|
-
repo, do a `rake package:rpm`. To build a deb, use `rake
|
54
|
+
repo, do a `bundle exec rake package:rpm`. To build a deb, use `bundle exec rake
|
55
|
+
package:deb`.
|
55
56
|
|
56
57
|
## `pl:` tasks
|
57
58
|
`pl:` namespaced tasks rely on a slighly more complex toolchain for packaging
|
@@ -75,32 +76,32 @@ separating these data and tasks out is to refrain from presenting by
|
|
75
76
|
default yet more Puppet-specific tasks that aren't generally consumable by
|
76
77
|
everyone. To build a deb from a local repository using a `pl` task, ssh into a
|
77
78
|
builder (e.g., one stood up using the modules detailed below) and clone the
|
78
|
-
source repo, e.g. puppet. Then, run `
|
79
|
-
to create a deb, and `rake pl:mock` to make an rpm (on a debian or
|
80
|
-
respectively).
|
79
|
+
source repo, e.g. puppet. Then, run `bundle install` and `bundle exec rake pl:deb`
|
80
|
+
to create a deb, and `bundle exec rake pl:mock` to make an rpm (on a debian or
|
81
|
+
redhat host, respectively).
|
81
82
|
|
82
83
|
## `pe:` tasks
|
83
|
-
There is also a `pe:` namespace, for the building of Puppet
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
84
|
+
There is also a `pe:` namespace, for the building of Puppet Labs' Puppet
|
85
|
+
Enterprise packages that have been converted to using this repo. The `pe:` tasks
|
86
|
+
rely heavily on PL internal infrastructure, and are not generally useful outside
|
87
|
+
of this environment. To create packages, in the source repository run `bundle
|
88
|
+
install`, followed by `bundle exec rake pl:fetch`. These two commands install
|
89
|
+
the packaging gem and pull in the additional data needed for PE building (see
|
90
|
+
`pl:fetch` notes above). Then, to make a debian package, run `bundle exec rake
|
91
|
+
pe:deb`, and to make an rpm, run `bundle exec rake pe:mock`. There are also
|
92
|
+
`pe:deb_all` and `pe:mock_all` tasks, which build packages against all shipped
|
93
|
+
debian/redhat targets. The `pe:deb_all` task is not generally necessary for
|
94
|
+
developer use for building test packages; the `pe:deb` task creates a package
|
95
|
+
that will work against virtually all supported PE debian versions. The same is
|
96
|
+
generally true for PE internal rpms, but because of variances in build macros
|
97
|
+
for rpm, rpms should generally be built with `pe:mock_all`, and then the desired
|
98
|
+
version installed, or by building only for a specific target. This is
|
99
|
+
accomplished by passing MOCK=<mock> to the rake call, e.g. `bundle exec rake
|
100
|
+
pe:mock MOCK=<mock>`. The available mocks are listed in
|
101
|
+
`ext/build_defaults.yaml` after `final_mocks:`. For PE, the mocks are formatted
|
102
|
+
as `pupent-<peversion>-<distversion>-<arch>`, e.g. `pupent-2.7-el5-i386`. To
|
103
|
+
build for a specific target, set `MOCK=<mock>` to the mock that matches the
|
104
|
+
target.
|
104
105
|
|
105
106
|
## `:remote:` tasks
|
106
107
|
There are also sub-namespaces of `:pl` and `:pe` that are
|
@@ -108,22 +109,24 @@ worth noting. First, the `:remote` namespace. Tasks under `:remote` perform
|
|
108
109
|
builds remotely on internal builders from your local workstation. How they
|
109
110
|
work:
|
110
111
|
|
111
|
-
|
112
|
+
0) Run `bundle install` to install the packaging gem and its dependencies.
|
113
|
+
|
114
|
+
1) Run `bundle exec pl:fetch` to obtain extra data from the build-data repo. The data
|
112
115
|
includes the hostnames of builders to use for packaging.
|
113
116
|
|
114
117
|
2) Create a git bundle of the local workspace and tar it up.
|
115
118
|
|
116
119
|
3) Create a build parameters file. The params file includes all the information
|
117
120
|
about the build, including any values overridden with env vars, and the actual
|
118
|
-
task to run, e.g. `rake pl:deb`.
|
121
|
+
task to run, e.g. `bundle exec rake pl:deb`.
|
119
122
|
|
120
123
|
4) scp the git bundle and build parameters file to a temporary directory on the
|
121
124
|
builder hostname assigned to that particular package build type.
|
122
125
|
|
123
|
-
5) ssh into the builder, untar the git bundle, clone it, and run `
|
124
|
-
|
126
|
+
5) ssh into the builder, untar the git bundle, clone it, and run `bundle
|
127
|
+
install`.
|
125
128
|
|
126
|
-
6) ssh into the builder, cd into the cloned repo, and run `rake
|
129
|
+
6) ssh into the builder, cd into the cloned repo, and run `bundle exec rake
|
127
130
|
pl:build_from_params PARAMS_FILE=/path/to/previously/sent/file`.
|
128
131
|
|
129
132
|
7) Maintain the ssh connection until the build finishes, and rsync the packages
|
@@ -206,18 +209,18 @@ the task are:
|
|
206
209
|
|
207
210
|
cd git_repo
|
208
211
|
|
209
|
-
###
|
210
|
-
|
212
|
+
### Install the packaging gem via Bundler
|
213
|
+
bundle install && bundle exec rake pl:fetch
|
211
214
|
|
212
215
|
### Perform the build
|
213
|
-
rake pl:load_extras pl:build_from_params PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
216
|
+
bundle exec rake pl:load_extras pl:build_from_params PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
214
217
|
|
215
218
|
### Send the results
|
216
|
-
rake pl:jenkins:ship["artifacts"]
|
219
|
+
bundle exec rake pl:jenkins:ship["artifacts"]
|
217
220
|
|
218
221
|
### If a downstream job was passed, trigger it now
|
219
222
|
if [ -n "$DOWNSTREAM_JOB" ] ; then
|
220
|
-
rake pl:jenkins:post["$DOWNSTREAM_JOB"]
|
223
|
+
bundle exec rake pl:jenkins:post["$DOWNSTREAM_JOB"]
|
221
224
|
fi
|
222
225
|
|
223
226
|
#################
|
@@ -258,18 +261,18 @@ analysis. Contents of this string are items which cannot be obtained from within
|
|
258
261
|
the Jenkins job itself. Note that the Groovy postbuild script needed for metrics
|
259
262
|
gathering is dynamically passed to each job.
|
260
263
|
|
261
|
-
This first job clones the git bundle passed in as a parameter, then
|
262
|
-
packaging
|
263
|
-
|
264
|
+
This first job clones the git bundle passed in as a parameter, then installs the
|
265
|
+
packaging gem (bundle install) and for every cell in its matrix performs a
|
266
|
+
package build for a specific target (e.g. bundle exec rake pl:deb
|
264
267
|
COW=base-lucid-i386.cow). Once all cells in the matrix complete (either succeed
|
265
|
-
or fail), this job automatically triggers the second of the new jobs
|
266
|
-
|
268
|
+
or fail), this job automatically triggers the second of the new jobs as a
|
269
|
+
downstream job.
|
267
270
|
|
268
271
|
To receive an email notification from jenkins about the status of the packaging
|
269
272
|
job, pass NOTIFY=<recipient> as an environment variable to the uber_build
|
270
273
|
invocation, e.g.:
|
271
274
|
|
272
|
-
rake pl:jenkins:uber_build NOTIFY="foo@puppet.com bar@puppet.com"
|
275
|
+
bundle exec rake pl:jenkins:uber_build NOTIFY="foo@puppet.com bar@puppet.com"
|
273
276
|
|
274
277
|
The second job is an automatic repository creation task for this git repo.
|
275
278
|
Specifically, the job copies the git bundle from the packaging job and clones
|
@@ -358,10 +361,6 @@ side of this packaging repo. The rpm-side module,
|
|
358
361
|
[puppetlabs-rpmbuilder](https://github.com/puppetlabs/puppetlabs-rpmbuilder),
|
359
362
|
will set up an rpm builder.
|
360
363
|
|
361
|
-
## Clean up
|
362
|
-
To remove the packaging repo, remove the ext/packaging directory or run `rake
|
363
|
-
package:implode`.
|
364
|
-
|
365
364
|
##Setting up projects for the Packaging Repo
|
366
365
|
|
367
366
|
The packaging repo requires many project-side artifacts inside the ext
|
@@ -377,48 +376,9 @@ spec file, and an osx preflight and plist.
|
|
377
376
|
|
378
377
|
The top level Rakefile or a separate task file in the project should have the following added:
|
379
378
|
|
380
|
-
(this assumes RAKE\_ROOT is defined in the top-level Rakefile using something like the following)
|
381
|
-
```ruby
|
382
|
-
RAKE_ROOT = File.expand_path(File.dirname(__FILE__))
|
383
|
-
```
|
384
|
-
|
385
379
|
```ruby
|
386
|
-
|
387
|
-
|
388
|
-
begin
|
389
|
-
require 'yaml'
|
390
|
-
@build_defaults ||= YAML.load_file(build_defs_file)
|
391
|
-
rescue Exception => e
|
392
|
-
$stderr.puts "Unable to load yaml from #{build_defs_file}:"
|
393
|
-
raise e
|
394
|
-
end
|
395
|
-
@packaging_url = @build_defaults['packaging_url']
|
396
|
-
@packaging_repo = @build_defaults['packaging_repo']
|
397
|
-
raise "Could not find packaging url in #{build_defs_file}" if @packaging_url.nil?
|
398
|
-
raise "Could not find packaging repo in #{build_defs_file}" if @packaging_repo.nil?
|
399
|
-
|
400
|
-
namespace :package do
|
401
|
-
desc "Bootstrap packaging automation, e.g. clone into packaging repo"
|
402
|
-
task :bootstrap do
|
403
|
-
if File.exist?(File.join(RAKE_ROOT, "ext", @packaging_repo))
|
404
|
-
puts "It looks like you already have ext/#{@packaging_repo}. If you don't like it, blow it away with package:implode."
|
405
|
-
else
|
406
|
-
cd File.join(RAKE_ROOT, 'ext') do
|
407
|
-
%x{git clone #{@packaging_url}}
|
408
|
-
end
|
409
|
-
end
|
410
|
-
end
|
411
|
-
desc "Remove all cloned packaging automation"
|
412
|
-
task :implode do
|
413
|
-
rm_rf File.join(RAKE_ROOT, "ext", @packaging_repo)
|
414
|
-
end
|
415
|
-
end
|
416
|
-
end
|
417
|
-
|
418
|
-
begin
|
419
|
-
load File.join(RAKE_ROOT, 'ext', 'packaging', 'packaging.rake')
|
420
|
-
rescue LoadError
|
421
|
-
end
|
380
|
+
require 'packaging'
|
381
|
+
Pkg::Util::RakeUtils.load_packaging_tasks
|
422
382
|
```
|
423
383
|
|
424
384
|
Also in ext should be two files, build_defaults.yaml and project_data.yaml (optional).
|
@@ -662,13 +622,6 @@ files:
|
|
662
622
|
[Setting up projects for the Packaging
|
663
623
|
Repo](https://github.com/MosesMendoza/packaging/tree/more_documentation#setting-up-projects-for-the-packaging-repo).
|
664
624
|
|
665
|
-
* **package:bootstrap**
|
666
|
-
|
667
|
-
Clone the packaging repo into this project. This task isn't actually in the
|
668
|
-
packaging repo itself, but resides in the project. See [Setting up projects
|
669
|
-
for the Packaging
|
670
|
-
Repo](https://github.com/puppetlabs/packaging#setting-up-projects-for-the-packaging-repo).
|
671
|
-
|
672
625
|
* **package:deb**
|
673
626
|
|
674
627
|
Use `debbuild` to create a deb package and associated debian package
|
@@ -681,13 +634,6 @@ files:
|
|
681
634
|
`ext/build_defaults.yaml` and `ext/project\_data.yaml`. The gem is staged
|
682
635
|
in `./pkg`.
|
683
636
|
|
684
|
-
* **package:implode**
|
685
|
-
|
686
|
-
Remove the packaging repo entirely from the project. This task isn't
|
687
|
-
actually in the packaging repo itself, but resides in the project. See
|
688
|
-
[Setting up projects for the Packaging
|
689
|
-
Repo](https://github.com/puppetlabs/packaging#setting-up-projects-for-the-packaging-repo).
|
690
|
-
|
691
637
|
* **package:ips**
|
692
638
|
|
693
639
|
Use Solaris 11 pkg* tools to create a IPS package from the project.
|
@@ -717,8 +663,8 @@ files:
|
|
717
663
|
* **pl:build_from_params**
|
718
664
|
|
719
665
|
Invoke a build from a build parameters yaml file. The parameters file
|
720
|
-
should be created with `rake pl:write_build_params`. The
|
721
|
-
build parameters file will override all values contained in
|
666
|
+
should be created with `bundle exec rake pl:write_build_params`. The
|
667
|
+
settings in the build parameters file will override all values contained in
|
722
668
|
`./ext/build_defaults.yaml` and `./ext/project_data.yaml`.
|
723
669
|
|
724
670
|
* **pl:deb**
|
@@ -733,10 +679,10 @@ files:
|
|
733
679
|
|
734
680
|
* **pl:deb_all***
|
735
681
|
|
736
|
-
The same as `rake pl:deb`, but a package is built for every cow
|
737
|
-
`ext/build_defaults.yaml` on the line `cows:<cows>`. The packages
|
738
|
-
associated source artifacts are staged in `./pkg/deb/$distribution`,
|
739
|
-
$distribution is the Debian/Ubuntu codename of the cow that was used to
|
682
|
+
The same as `bundle exec rake pl:deb`, but a package is built for every cow
|
683
|
+
listed in `ext/build_defaults.yaml` on the line `cows:<cows>`. The packages
|
684
|
+
and associated source artifacts are staged in `./pkg/deb/$distribution`,
|
685
|
+
where $distribution is the Debian/Ubuntu codename of the cow that was used to
|
740
686
|
build the package, e.g. "wheezy" or "precise."
|
741
687
|
|
742
688
|
* **pl:ips**
|
@@ -905,11 +851,11 @@ files:
|
|
905
851
|
|
906
852
|
* **pl:mock_all**
|
907
853
|
|
908
|
-
The same as `rake pl:mock`, but a package is built for every
|
909
|
-
`ext/build_defaults.yaml` on the line `mocks:<mocks>`.
|
910
|
-
in `./pkg/<repo_name>/(el | fedora)/$version/(i386 |
|
911
|
-
SRPMS)`. The subdirectories are dependent on the mock that is used.
|
912
|
-
task assumes that the mock configurations are the standard Puppet mock
|
854
|
+
The same as `bundle exec rake pl:mock`, but a package is built for every
|
855
|
+
mock listed in `ext/build_defaults.yaml` on the line `mocks:<mocks>`.
|
856
|
+
Packages are staged in `./pkg/<repo_name>/(el | fedora)/$version/(i386 |
|
857
|
+
x86_64 | SRPMS)`. The subdirectories are dependent on the mock that is used.
|
858
|
+
The task assumes that the mock configurations are the standard Puppet mock
|
913
859
|
configurations that are generated by the
|
914
860
|
[puppetlabs-rpmbuilder](https://github.com/puppetlabs/puppetlabs-rpmbuilder)
|
915
861
|
module.
|
data/lib/packaging/platforms.rb
CHANGED
@@ -193,6 +193,14 @@ module Pkg
|
|
193
193
|
signature_format: 'v4',
|
194
194
|
repo: true,
|
195
195
|
},
|
196
|
+
'29' => {
|
197
|
+
architectures: ['x86_64'],
|
198
|
+
source_architecture: 'SRPMS',
|
199
|
+
package_format: 'rpm',
|
200
|
+
source_package_formats: ['src.rpm'],
|
201
|
+
signature_format: 'v4',
|
202
|
+
repo: true,
|
203
|
+
},
|
196
204
|
},
|
197
205
|
|
198
206
|
'osx' => {
|
data/lib/packaging/util/net.rb
CHANGED
@@ -347,7 +347,7 @@ module Pkg::Util::Net
|
|
347
347
|
# We take a tar argument for cases where `tar` isn't best, e.g. Solaris. We
|
348
348
|
# also take an optional argument of the tarball containing the git bundle to
|
349
349
|
# use.
|
350
|
-
def
|
350
|
+
def remote_unpack_git_bundle(host, treeish, tar_cmd = nil, tarball = nil)
|
351
351
|
unless tar = tar_cmd
|
352
352
|
tar = 'tar'
|
353
353
|
end
|
@@ -355,19 +355,13 @@ module Pkg::Util::Net
|
|
355
355
|
tarball_name = File.basename(tarball).gsub('.tar.gz', '')
|
356
356
|
Pkg::Util::Net.rsync_to(tarball, host, '/tmp')
|
357
357
|
appendix = Pkg::Util.rand_string
|
358
|
+
git_bundle_directory = File.join('/tmp', "#{Pkg::Config.project}-#{appendix}")
|
358
359
|
command = <<-DOC
|
359
360
|
#{tar} -zxvf /tmp/#{tarball_name}.tar.gz -C /tmp/ ;
|
360
|
-
git clone --recursive /tmp/#{tarball_name}
|
361
|
-
cd /tmp/#{Pkg::Config.project}-#{appendix} ;
|
362
|
-
bundle_prefix= ;
|
363
|
-
if [[ -r Gemfile ]]; then
|
364
|
-
#{remote_bundle_install_command}
|
365
|
-
bundle_prefix='bundle exec' ;
|
366
|
-
fi ;
|
367
|
-
$bundle_prefix rake package:bootstrap
|
361
|
+
git clone --recursive /tmp/#{tarball_name} #{git_bundle_directory} ;
|
368
362
|
DOC
|
369
363
|
Pkg::Util::Net.remote_ssh_cmd(host, command)
|
370
|
-
|
364
|
+
return git_bundle_directory
|
371
365
|
end
|
372
366
|
|
373
367
|
def remote_bundle_install_command
|
data/tasks/00_utils.rake
CHANGED
@@ -195,11 +195,6 @@ def deprecate(old_cmd, new_cmd = nil)
|
|
195
195
|
Pkg::Util.deprecate(old_cmd, new_cmd)
|
196
196
|
end
|
197
197
|
|
198
|
-
def remote_bootstrap(host, treeish, tar_cmd = nil, tarball = nil)
|
199
|
-
Pkg::Util.deprecate('remote_bootstrap', 'Pkg::Util::Net.remote_bootstrap')
|
200
|
-
Pkg::Util::Net.remote_bootstrap(host, treeish, tar_cmd, tarball)
|
201
|
-
end
|
202
|
-
|
203
198
|
def remote_buildparams(host, build)
|
204
199
|
Pkg::Util.deprecate('remote_buildparams', 'Pkg::Util::Net.remote_buildparams')
|
205
200
|
Pkg::Util::Net.remote_buildparams(host, build)
|
data/tasks/jenkins.rake
CHANGED
@@ -52,14 +52,14 @@
|
|
52
52
|
#
|
53
53
|
# pushd git_repo
|
54
54
|
#
|
55
|
-
# ###
|
56
|
-
#
|
55
|
+
# ### Install the packaging gem via Bundler
|
56
|
+
# bundle install
|
57
57
|
#
|
58
58
|
# ### Perform the build
|
59
|
-
# rake pl:build_from_params PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
59
|
+
# bundle exec rake pl:build_from_params PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
60
60
|
#
|
61
61
|
# ### Send the results
|
62
|
-
# rake pl:jenkins:ship["artifacts"] PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
62
|
+
# bundle exec rake pl:jenkins:ship["artifacts"] PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
63
63
|
#
|
64
64
|
# popd
|
65
65
|
# popd
|
@@ -75,7 +75,7 @@
|
|
75
75
|
# if [ -n "$DOWNSTREAM_JOB" ] ; then
|
76
76
|
# pushd project
|
77
77
|
# pushd git_repo
|
78
|
-
# rake pl:jenkins:post["$DOWNSTREAM_JOB"] PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
78
|
+
# bundle exec rake pl:jenkins:post["$DOWNSTREAM_JOB"] PARAMS_FILE=$WORKSPACE/BUILD_PROPERTIES
|
79
79
|
# popd
|
80
80
|
# popd
|
81
81
|
# fi
|
data/tasks/nightly_repos.rake
CHANGED
@@ -18,17 +18,13 @@ namespace :pl do
|
|
18
18
|
Pkg::Util::File.empty_dir?("repos") and fail "There were no repos found in repos/. Maybe something in the pipeline failed?"
|
19
19
|
signing_bundle = ENV['SIGNING_BUNDLE']
|
20
20
|
|
21
|
-
remote_repo = Pkg::Util::Net.
|
21
|
+
remote_repo = Pkg::Util::Net.remote_unpack_git_bundle(signing_server, 'HEAD', nil, signing_bundle)
|
22
22
|
build_params = Pkg::Util::Net.remote_buildparams(signing_server, Pkg::Config)
|
23
23
|
Pkg::Util::Net.rsync_to('repos', signing_server, remote_repo)
|
24
24
|
rake_command = <<-DOC
|
25
25
|
cd #{remote_repo} ;
|
26
|
-
|
27
|
-
|
28
|
-
#{Pkg::Util::Net.remote_bundle_install_command}
|
29
|
-
bundle_prefix='bundle exec';
|
30
|
-
fi ;
|
31
|
-
$bundle_prefix rake pl:jenkins:sign_repos GPG_KEY=#{Pkg::Util::Gpg.key} PARAMS_FILE=#{build_params}
|
26
|
+
#{Pkg::Util::Net.remote_bundle_install_command}
|
27
|
+
bundle exec rake pl:jenkins:sign_repos GPG_KEY=#{Pkg::Util::Gpg.key} PARAMS_FILE=#{build_params}
|
32
28
|
DOC
|
33
29
|
Pkg::Util::Net.remote_ssh_cmd(signing_server, rake_command)
|
34
30
|
Pkg::Util::Net.rsync_from("#{remote_repo}/repos/", signing_server, target)
|
data/tasks/sign.rake
CHANGED
@@ -136,17 +136,13 @@ namespace :pl do
|
|
136
136
|
sign_tasks << "pl:sign_svr4" if Pkg::Config.vanagon_project
|
137
137
|
sign_tasks << "pl:sign_ips" if Pkg::Config.vanagon_project
|
138
138
|
sign_tasks << "pl:sign_msi" if Pkg::Config.build_msi || Pkg::Config.vanagon_project
|
139
|
-
remote_repo = Pkg::Util::Net.
|
139
|
+
remote_repo = Pkg::Util::Net.remote_unpack_git_bundle(Pkg::Config.signing_server, 'HEAD', nil, signing_bundle)
|
140
140
|
build_params = Pkg::Util::Net.remote_buildparams(Pkg::Config.signing_server, Pkg::Config)
|
141
141
|
Pkg::Util::Net.rsync_to(root_dir, Pkg::Config.signing_server, remote_repo)
|
142
142
|
rake_command = <<-DOC
|
143
143
|
cd #{remote_repo} ;
|
144
|
-
|
145
|
-
|
146
|
-
#{Pkg::Util::Net.remote_bundle_install_command}
|
147
|
-
bundle_prefix='bundle exec';
|
148
|
-
fi ;
|
149
|
-
$bundle_prefix rake #{sign_tasks.map { |task| task + "[#{root_dir}]" }.join(" ")} PARAMS_FILE=#{build_params}
|
144
|
+
#{Pkg::Util::Net.remote_bundle_install_command}
|
145
|
+
bundle exec rake #{sign_tasks.map { |task| task + "[#{root_dir}]" }.join(" ")} PARAMS_FILE=#{build_params}
|
150
146
|
DOC
|
151
147
|
Pkg::Util::Net.remote_ssh_cmd(Pkg::Config.signing_server, rake_command)
|
152
148
|
Pkg::Util::Net.rsync_from("#{remote_repo}/#{root_dir}/", Pkg::Config.signing_server, "#{root_dir}/")
|
data/templates/packaging.xml.erb
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
<actions/>
|
4
4
|
<description><p>
|
5
5
|
Dynamically Created Packaging Job for a packaging repo-compatible project.
|
6
|
-
Intended to be triggered from within a project with the packaging
|
7
|
-
bootstrapped.
|
6
|
+
Intended to be triggered from within a project with the packaging gem installed.
|
8
7
|
</p>
|
9
8
|
<p>
|
10
9
|
Three parameters are expected:
|
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.99.
|
4
|
+
version: 0.99.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
223
|
version: '0'
|
224
224
|
requirements: []
|
225
225
|
rubyforge_project:
|
226
|
-
rubygems_version: 2.6
|
226
|
+
rubygems_version: 2.7.6
|
227
227
|
signing_key:
|
228
228
|
specification_version: 4
|
229
229
|
summary: Puppet Labs' packaging automation
|