puppet 2.7.25 → 2.7.26
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.
- data/bin/puppet +4 -0
- data/ext/build_defaults.yaml +4 -4
- data/ext/debian/control +1 -1
- data/ext/packaging/Gemfile +8 -0
- data/ext/packaging/Gemfile.lock +28 -0
- data/ext/packaging/README.md +31 -4
- data/ext/packaging/lib/packaging.rb +21 -0
- data/ext/packaging/lib/packaging/config.rb +277 -0
- data/ext/packaging/lib/packaging/config/params.rb +175 -0
- data/ext/packaging/lib/packaging/tar.rb +186 -0
- data/ext/packaging/lib/packaging/util.rb +44 -0
- data/ext/packaging/lib/packaging/util/date.rb +15 -0
- data/ext/packaging/lib/packaging/util/file.rb +60 -0
- data/ext/packaging/lib/packaging/util/jira.rb +83 -0
- data/ext/packaging/lib/packaging/util/net.rb +16 -0
- data/ext/packaging/lib/packaging/util/rake_utils.rb +57 -0
- data/ext/packaging/lib/packaging/util/serialization.rb +19 -0
- data/ext/packaging/lib/packaging/util/tool.rb +30 -0
- data/ext/packaging/lib/packaging/util/version.rb +300 -0
- data/ext/packaging/packaging.rake +10 -5
- data/ext/packaging/spec/fixtures/config/ext/build_defaults.yaml +2 -0
- data/ext/packaging/spec/fixtures/config/ext/project_data.yaml +2 -0
- data/ext/packaging/spec/fixtures/config/params.yaml +2 -0
- data/ext/packaging/spec/fixtures/util/pre_tasks.yaml +4 -0
- data/ext/packaging/spec/lib/packaging/config_spec.rb +330 -0
- data/ext/packaging/spec/lib/packaging/tar_spec.rb +122 -0
- data/ext/packaging/spec/lib/packaging/util/file_spec.rb +48 -0
- data/ext/packaging/spec/lib/packaging/util/jira_spec.rb +50 -0
- data/ext/packaging/spec/lib/packaging/util/net_spec.rb +23 -0
- data/ext/packaging/spec/lib/packaging/util/rake_utils_spec.rb +70 -0
- data/ext/packaging/spec/lib/packaging/util/version_spec.rb +67 -0
- data/ext/packaging/spec/lib/packaging_spec.rb +19 -0
- data/ext/packaging/spec/spec_helper.rb +10 -0
- data/ext/packaging/spec/tasks/00_utils_spec.rb +218 -88
- data/ext/packaging/tasks/00_utils.rake +63 -320
- data/ext/packaging/tasks/30_metrics.rake +4 -4
- data/ext/packaging/tasks/apple.rake +28 -13
- data/ext/packaging/tasks/build.rake +2 -176
- data/ext/packaging/tasks/deb.rake +61 -20
- data/ext/packaging/tasks/deb_repos.rake +12 -12
- data/ext/packaging/tasks/doc.rake +5 -5
- data/ext/packaging/tasks/fetch.rake +9 -9
- data/ext/packaging/tasks/gem.rake +59 -33
- data/ext/packaging/tasks/ips.rake +22 -23
- data/ext/packaging/tasks/jenkins.rake +34 -34
- data/ext/packaging/tasks/jenkins_dynamic.rake +22 -19
- data/ext/packaging/tasks/load_extras.rake +21 -0
- data/ext/packaging/tasks/mock.rake +16 -16
- data/ext/packaging/tasks/pe_deb.rake +2 -2
- data/ext/packaging/tasks/pe_remote.rake +9 -9
- data/ext/packaging/tasks/pe_rpm.rake +1 -1
- data/ext/packaging/tasks/pe_ship.rake +48 -37
- data/ext/packaging/tasks/pe_sign.rake +5 -5
- data/ext/packaging/tasks/release.rake +5 -5
- data/ext/packaging/tasks/remote_build.rake +27 -27
- data/ext/packaging/tasks/retrieve.rake +5 -5
- data/ext/packaging/tasks/rpm.rake +27 -10
- data/ext/packaging/tasks/rpm_repos.rake +13 -12
- data/ext/packaging/tasks/ship.rake +67 -45
- data/ext/packaging/tasks/sign.rake +37 -30
- data/ext/packaging/tasks/tar.rake +14 -69
- data/ext/packaging/tasks/tickets.rake +449 -0
- data/ext/packaging/tasks/update.rake +2 -2
- data/ext/packaging/tasks/vendor_gems.rake +2 -2
- data/ext/packaging/tasks/version.rake +8 -38
- data/ext/packaging/tasks/z_data_dump.rake +35 -3
- data/ext/packaging/templates/downstream.xml.erb +2 -2
- data/ext/packaging/templates/packaging.xml.erb +13 -13
- data/ext/packaging/templates/repo.xml.erb +9 -7
- data/lib/puppet/indirector/facts/facter.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/spec/unit/indirector/facts/facter_spec.rb +2 -2
- metadata +38 -13
- data/ext/packaging/spec/tasks/build_object_spec.rb +0 -178
- data/ext/packaging/tasks/10_setupvars.rake +0 -135
- data/ext/packaging/tasks/20_setupextravars.rake +0 -53
- data/ext/packaging/tasks/template.rake +0 -27
@@ -2,8 +2,8 @@ namespace :package do
|
|
2
2
|
desc "Update your clone of the packaging repo with `git pull`"
|
3
3
|
task :update do
|
4
4
|
cd 'ext/packaging' do
|
5
|
-
remote =
|
6
|
-
branch =
|
5
|
+
remote = Pkg::Config.packaging_url.split(' ')[0]
|
6
|
+
branch = Pkg::Config.packaging_url.split(' ')[1].split('=')[1]
|
7
7
|
if branch.nil? or remote.nil?
|
8
8
|
STDERR.puts "Couldn't parse the packaging repo URL from 'ext/build_defaults.yaml'."
|
9
9
|
STDERR.puts "Normally this is a string in the format git@github.com:<User>/<packaging_repo> --branch=<branch>"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# This is an optional pre-tar-task, so we only want to present it if we're
|
2
2
|
# using it
|
3
|
-
if
|
3
|
+
if Pkg::Config.pre_tar_task
|
4
4
|
namespace :package do
|
5
5
|
desc "vendor gems required by project"
|
6
6
|
task :vendor_gems do
|
7
|
-
check_tool("bundle")
|
7
|
+
Pkg::Util::Tool.check_tool("bundle")
|
8
8
|
require 'bundler'
|
9
9
|
|
10
10
|
class UI
|
@@ -12,51 +12,21 @@
|
|
12
12
|
# revisiting this task and improving it substantially,
|
13
13
|
# and/or standardizing the expected version file format.
|
14
14
|
namespace :package do
|
15
|
-
desc "
|
16
|
-
task :versionbump, :workdir do |t, args|
|
17
|
-
version = ENV['VERSION'] || @build.version.to_s.strip
|
18
|
-
new_version = '"' + version + '"'
|
19
|
-
|
20
|
-
version_file = "#{args.workdir ? args.workdir + '/' : ''}#{@build.version_file}"
|
21
|
-
|
22
|
-
# Read the previous version file in...
|
23
|
-
contents = IO.read(version_file)
|
24
|
-
|
25
|
-
# Match version files containing 'VERSION = "x.x.x"' and just x.x.x
|
26
|
-
if version_string = contents.match(/VERSION =.*/)
|
27
|
-
old_version = version_string.to_s.split()[-1]
|
28
|
-
else
|
29
|
-
old_version = contents
|
30
|
-
end
|
31
|
-
|
32
|
-
puts "Updating #{old_version} to #{new_version} in #{version_file}"
|
33
|
-
if contents.match("@DEVELOPMENT_VERSION@")
|
34
|
-
contents.gsub!("@DEVELOPMENT_VERSION@", version)
|
35
|
-
elsif contents.match('version\s*=\s*[\'"]DEVELOPMENT[\'"]')
|
36
|
-
contents.gsub!(/version\s*=\s*['"]DEVELOPMENT['"]/, "version = '#{version}'")
|
37
|
-
elsif contents.match("VERSION = #{old_version}")
|
38
|
-
contents.gsub!("VERSION = #{old_version}", "VERSION = #{new_version}")
|
39
|
-
elsif contents.match("#{@build.project.upcase}VERSION = #{old_version}")
|
40
|
-
contents.gsub!("#{@build.project.upcase}VERSION = #{old_version}", "#{@build.project.upcase}VERSION = #{new_version}")
|
41
|
-
else
|
42
|
-
contents.gsub!(old_version, @build.version)
|
43
|
-
end
|
44
|
-
|
45
|
-
# ...and write it back on out.
|
46
|
-
File.open(version_file, 'w') {|f| f.write contents }
|
47
|
-
end
|
48
|
-
|
49
|
-
desc "Set and commit the version in #{@build.version_file}, requires VERSION."
|
15
|
+
desc "Set and commit the version in #{Pkg::Config.version_file}, requires VERSION."
|
50
16
|
task :versionset do
|
51
17
|
check_var('VERSION', ENV['VERSION'])
|
52
|
-
|
53
|
-
git_commit_file(
|
18
|
+
Pkg::Util::Version.versionbump
|
19
|
+
git_commit_file(Pkg::Config.version_file, "update to #{ENV['VERSION']}")
|
20
|
+
end
|
21
|
+
|
22
|
+
task :versionbump, :workdir do |t, args|
|
23
|
+
Pkg::Util::Version.versionbump(args.workdir)
|
54
24
|
end
|
55
25
|
|
56
26
|
# A set of tasks for printing the version
|
57
27
|
[:version, :rpmversion, :rpmrelease, :debversion, :release].each do |task|
|
58
28
|
task "#{task}" do
|
59
|
-
STDOUT.puts
|
29
|
+
STDOUT.puts Pkg::Config.instance_variable_get("@#{task}")
|
60
30
|
end
|
61
31
|
end
|
62
32
|
end
|
@@ -17,9 +17,9 @@ namespace :pl do
|
|
17
17
|
task :write_build_params do
|
18
18
|
if ENV['TASK']
|
19
19
|
task_args = ENV['TASK'].split(' ')
|
20
|
-
|
20
|
+
Pkg::Config.task = { :task => task_args[0], :args => task_args[1..-1] }
|
21
21
|
end
|
22
|
-
|
22
|
+
Pkg::Config.config_to_yaml(ENV['OUTPUT_DIR'])
|
23
23
|
end
|
24
24
|
|
25
25
|
##
|
@@ -27,7 +27,39 @@ namespace :pl do
|
|
27
27
|
#
|
28
28
|
desc "Print all package build parameters"
|
29
29
|
task :print_build_params do
|
30
|
-
|
30
|
+
Pkg::Config.print_config
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Print a parameter passed as an argument to STDOUT.
|
35
|
+
desc "Print a build parameter"
|
36
|
+
task :print_build_param, :param do |t, args|
|
37
|
+
# We want a string that is the from "@<param name>"
|
38
|
+
if param = args.param
|
39
|
+
getter = param.dup
|
40
|
+
if param[0] == ':'
|
41
|
+
getter = param[1..-1]
|
42
|
+
param[0] = "@"
|
43
|
+
elsif param[0] == "@"
|
44
|
+
getter = param[1..-1]
|
45
|
+
else
|
46
|
+
param.insert(0, "@")
|
47
|
+
end
|
48
|
+
|
49
|
+
# We want to fail if the param passed is bogus, print 'nil' if its not
|
50
|
+
# set, and print the value if its set.
|
51
|
+
if Pkg::Config.respond_to?(getter)
|
52
|
+
if val = Pkg::Config.instance_variable_get(param)
|
53
|
+
puts val
|
54
|
+
else
|
55
|
+
puts 'nil'
|
56
|
+
end
|
57
|
+
else
|
58
|
+
fail "Could not locate a build parameter called #{param}. For a list of available parameters, do `rake pl:print_build_params`"
|
59
|
+
end
|
60
|
+
else
|
61
|
+
fail "To print a build parameter, pass the param name as a rake argument. Ex: rake pl:print_build_param[:version]"
|
62
|
+
end
|
31
63
|
end
|
32
64
|
end
|
33
65
|
|
@@ -24,7 +24,7 @@ When DOWNSTREAM_JOB is passed to the packaging repo, this job is created to wrap
|
|
24
24
|
<hudson.tasks.Shell>
|
25
25
|
<command>#!/bin/bash
|
26
26
|
## We have to check if this has been triggered by a successful package and repo build
|
27
|
-
curl -s "http://<%= "#{
|
27
|
+
curl -s "http://<%= "#{Pkg::Config.jenkins_build_host}" %>/job/<%= "#{Pkg::Config.project}-repo-#{Pkg::Config.build_date}-#{Pkg::Config.ref}" %>/lastBuild/api/json" | grep result\":\"SUCCESS\" > /dev/null
|
28
28
|
|
29
29
|
UPSTREAM_BUILD_STATUS=$?
|
30
30
|
|
@@ -37,7 +37,7 @@ else
|
|
37
37
|
fi
|
38
38
|
|
39
39
|
# This URI was passed in as an argument to the original rake package call
|
40
|
-
curl --fail -i "<%= escape_html(add_param_to_uri(ENV['DOWNSTREAM_JOB'], "PACKAGE_BUILD_STATUS=$UPSTREAM_BUILD_STATUS")) %>"</command>
|
40
|
+
curl -v --fail -i "<%= escape_html(add_param_to_uri(add_param_to_uri(ENV['DOWNSTREAM_JOB'], "PACKAGE_BUILD_STATUS=$UPSTREAM_BUILD_STATUS"), "PACKAGE_BUILD_URL=#{ENV["PACKAGE_BUILD_URL"]}")) %>"</command>
|
41
41
|
</hudson.tasks.Shell>
|
42
42
|
</builders>
|
43
43
|
<publishers/>
|
@@ -55,17 +55,17 @@ pl:jenkins:uber_build NOTIFY=foo@puppetlabs.com
|
|
55
55
|
<properties>
|
56
56
|
<jp.ikedam.jenkins.plugins.groovy__label__assignment.GroovyLabelAssignmentProperty plugin="groovy-label-assignment@1.0.0">
|
57
57
|
<groovyScript>def labelMap = [
|
58
|
-
<%
|
58
|
+
<% Pkg::Config.cows.split(' ').each do |cow| %>
|
59
59
|
<% if cow =~ /cumulus/ %>
|
60
60
|
"pl_deb COW=<%= cow %>": "cumulus",
|
61
61
|
<% else %>
|
62
62
|
"pl_deb COW=<%= cow %>": "deb",
|
63
63
|
<% end %>
|
64
64
|
<% end %>
|
65
|
-
<%
|
65
|
+
<% Pkg::Config.final_mocks.split(' ').each do |mock| %>"pl_mock MOCK=<%= mock %>": "rpm",<% end %>
|
66
66
|
"package_tar": "rpm",
|
67
|
-
<% if
|
68
|
-
<% if
|
67
|
+
<% if Pkg::Config.build_gem then %>"package_gem": "gem",<% end %>
|
68
|
+
<% if Pkg::Config.build_dmg then %>"package_apple": "dmg",<% end %>
|
69
69
|
];
|
70
70
|
return labelMap.get(binding.getVariables().get("command"));</groovyScript>
|
71
71
|
</jp.ikedam.jenkins.plugins.groovy__label__assignment.GroovyLabelAssignmentProperty>
|
@@ -107,11 +107,11 @@ return labelMap.get(binding.getVariables().get("command"));</groovyScr
|
|
107
107
|
<hudson.matrix.TextAxis>
|
108
108
|
<name>command</name>
|
109
109
|
<values>
|
110
|
-
<%
|
111
|
-
<%
|
110
|
+
<% Pkg::Config.cows.split(' ').each do |cow| %><string>pl_deb COW=<%= cow %></string><% end %>
|
111
|
+
<% Pkg::Config.final_mocks.split(' ').each do |mock| %><string>pl_mock MOCK=<%= mock %></string><% end %>
|
112
112
|
<string>package_tar</string>
|
113
|
-
<% if
|
114
|
-
<% if
|
113
|
+
<% if Pkg::Config.build_gem then %><string>package_gem</string><% end %>
|
114
|
+
<% if Pkg::Config.build_dmg then %><string>package_apple</string><% end %>
|
115
115
|
</values>
|
116
116
|
</hudson.matrix.TextAxis>
|
117
117
|
</axes>
|
@@ -166,7 +166,7 @@ def get_jenkins_build_time() {
|
|
166
166
|
|
167
167
|
// Assemble metrics to post to build metrics server
|
168
168
|
|
169
|
-
app_server = "<%=
|
169
|
+
app_server = "<%= Pkg::Config.metrics_url %>"
|
170
170
|
task_metrics = manager.build.getEnvironment(manager.listener)['METRICS']
|
171
171
|
charset = "UTF-8"
|
172
172
|
|
@@ -289,12 +289,12 @@ try {
|
|
289
289
|
<behavior>0</behavior>
|
290
290
|
</org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
|
291
291
|
<hudson.tasks.ArtifactArchiver>
|
292
|
-
<artifacts>**/PROJECT_BUNDLE</artifacts>
|
292
|
+
<artifacts>**/PROJECT_BUNDLE, **/BUILD_PROPERTIES</artifacts>
|
293
293
|
<latestOnly>false</latestOnly>
|
294
294
|
<allowEmptyArchive>false</allowEmptyArchive>
|
295
|
-
</hudson.tasks.ArtifactArchiver><% if
|
295
|
+
</hudson.tasks.ArtifactArchiver><% if Pkg::Config.notify %>
|
296
296
|
<hudson.tasks.Mailer plugin="mailer@1.4">
|
297
|
-
<recipients><%= "#{
|
297
|
+
<recipients><%= "#{Pkg::Config.notify}" %></recipients>
|
298
298
|
<dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
|
299
299
|
<sendToIndividuals>false</sendToIndividuals>
|
300
300
|
</hudson.tasks.Mailer><% end %>
|
@@ -304,7 +304,7 @@ try {
|
|
304
304
|
<configs>
|
305
305
|
<hudson.plugins.parameterizedtrigger.CurrentBuildParameters/>
|
306
306
|
</configs>
|
307
|
-
<projects><%= "#{
|
307
|
+
<projects><%= "#{Pkg::Config.project}-repo-#{Pkg::Config.build_date}-#{Pkg::Config.ref}" %></projects>
|
308
308
|
<condition>ALWAYS</condition>
|
309
309
|
<triggerWithNoParameters>false</triggerWithNoParameters>
|
310
310
|
</hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
|
@@ -31,8 +31,8 @@ This job will trigger the downstream job supplied with DOWNSTREAM_JOB if passed
|
|
31
31
|
<concurrentBuild>false</concurrentBuild>
|
32
32
|
<builders>
|
33
33
|
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.25">
|
34
|
-
<projectName><%= "#{
|
35
|
-
<filter>**/PROJECT_BUNDLE</filter>
|
34
|
+
<projectName><%= "#{Pkg::Config.project}-packaging-#{Pkg::Config.build_date}-#{Pkg::Config.ref}" %>/command=package_tar</projectName>
|
35
|
+
<filter>**/PROJECT_BUNDLE, **/BUILD_PROPERTIES</filter>
|
36
36
|
<target></target>
|
37
37
|
<selector class="hudson.plugins.copyartifact.TriggeredBuildSelector">
|
38
38
|
<fallbackToLastSuccessful>true</fallbackToLastSuccessful>
|
@@ -42,7 +42,7 @@ This job will trigger the downstream job supplied with DOWNSTREAM_JOB if passed
|
|
42
42
|
<hudson.tasks.Shell>
|
43
43
|
<command>#!/bin/bash
|
44
44
|
## We have to check if this has been triggered by a successful package build
|
45
|
-
curl -s "http://<%= "#{
|
45
|
+
curl -s "http://<%= "#{Pkg::Config.jenkins_build_host}" %>/job/<%= "#{Pkg::Config.project}-packaging-#{Pkg::Config.build_date}-#{Pkg::Config.ref}" %>/lastBuild/api/json" | grep result\":\"SUCCESS\" > /dev/null
|
46
46
|
|
47
47
|
PACKAGE_BUILD_RESULT=$?
|
48
48
|
|
@@ -50,7 +50,7 @@ set -e
|
|
50
50
|
|
51
51
|
if [ $PACKAGE_BUILD_RESULT -eq 0 ] ; then
|
52
52
|
echo "Detected upstream package build success. Building repos."
|
53
|
-
### We
|
53
|
+
### We've retrieved the git bundle from the tarball build, so now we clone it
|
54
54
|
### and use it to trigger our repo creation
|
55
55
|
#
|
56
56
|
# PROJECT_BUNDLE is a tarball containing a bundle file and git_repo is the
|
@@ -59,6 +59,8 @@ if [ $PACKAGE_BUILD_RESULT -eq 0 ] ; then
|
|
59
59
|
|
60
60
|
[ -f "PROJECT_BUNDLE" ] || exit 1
|
61
61
|
|
62
|
+
[ -f "BUILD_PROPERTIES" ] || exit 1
|
63
|
+
|
62
64
|
[ -d project ] && rm -rf project
|
63
65
|
|
64
66
|
mkdir project && tar -xzf PROJECT_BUNDLE -C project/
|
@@ -72,8 +74,8 @@ if [ $PACKAGE_BUILD_RESULT -eq 0 ] ; then
|
|
72
74
|
rake package:bootstrap --trace
|
73
75
|
|
74
76
|
### Run repo creation
|
75
|
-
rake pl:jenkins:rpm_repos --trace
|
76
|
-
rake pl:jenkins:deb_repos --trace
|
77
|
+
rake PARAMS_FILE=../../BUILD_PROPERTIES pl:jenkins:rpm_repos --trace
|
78
|
+
rake PARAMS_FILE=../../BUILD_PROPERTIES pl:jenkins:deb_repos --trace
|
77
79
|
|
78
80
|
popd
|
79
81
|
popd
|
@@ -87,7 +89,7 @@ fi
|
|
87
89
|
</builders><% if ENV['DOWNSTREAM_JOB'] %>
|
88
90
|
<publishers>
|
89
91
|
<hudson.tasks.BuildTrigger>
|
90
|
-
<childProjects><%= "#{
|
92
|
+
<childProjects><%= "#{Pkg::Config.project}-downstream-#{Pkg::Config.build_date}-#{Pkg::Config.ref}" %></childProjects>
|
91
93
|
<threshold>
|
92
94
|
<name>FAILURE</name>
|
93
95
|
<ordinal>2</ordinal>
|
data/lib/puppet/version.rb
CHANGED
@@ -123,8 +123,8 @@ describe Puppet::Node::Facts::Facter do
|
|
123
123
|
|
124
124
|
Dir.expects(:glob).with("*.rb").returns %w{a.rb b.rb}
|
125
125
|
|
126
|
-
Puppet::Node::Facts::Facter.expects(:load).with(
|
127
|
-
Puppet::Node::Facts::Facter.expects(:load).with(
|
126
|
+
Puppet::Node::Facts::Facter.expects(:load).with File.join('.', 'a.rb')
|
127
|
+
Puppet::Node::Facts::Facter.expects(:load).with File.join('.', 'b.rb')
|
128
128
|
|
129
129
|
Puppet::Node::Facts::Facter.load_facts_in_dir("mydir")
|
130
130
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.26
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: facter
|
@@ -33,13 +33,13 @@ executables:
|
|
33
33
|
- filebucket
|
34
34
|
- pi
|
35
35
|
- puppet
|
36
|
-
- puppetdoc
|
37
|
-
- ralsh
|
38
36
|
- puppetca
|
39
37
|
- puppetd
|
38
|
+
- puppetdoc
|
40
39
|
- puppetmasterd
|
41
40
|
- puppetqd
|
42
41
|
- puppetrun
|
42
|
+
- ralsh
|
43
43
|
extensions: []
|
44
44
|
extra_rdoc_files: []
|
45
45
|
files:
|
@@ -54,7 +54,12 @@ files:
|
|
54
54
|
- bin/filebucket
|
55
55
|
- bin/pi
|
56
56
|
- bin/puppet
|
57
|
+
- bin/puppetca
|
58
|
+
- bin/puppetd
|
57
59
|
- bin/puppetdoc
|
60
|
+
- bin/puppetmasterd
|
61
|
+
- bin/puppetqd
|
62
|
+
- bin/puppetrun
|
58
63
|
- bin/ralsh
|
59
64
|
- lib/puppet.rb
|
60
65
|
- lib/puppet/agent.rb
|
@@ -1040,17 +1045,41 @@ files:
|
|
1040
1045
|
- ext/osx/file_mapping.yaml
|
1041
1046
|
- ext/osx/preflight.erb
|
1042
1047
|
- ext/osx/prototype.plist.erb
|
1048
|
+
- ext/packaging/Gemfile
|
1049
|
+
- ext/packaging/Gemfile.lock
|
1043
1050
|
- ext/packaging/LICENSE
|
1044
1051
|
- ext/packaging/README-Solaris.md
|
1045
1052
|
- ext/packaging/README.md
|
1053
|
+
- ext/packaging/lib/packaging.rb
|
1054
|
+
- ext/packaging/lib/packaging/config.rb
|
1055
|
+
- ext/packaging/lib/packaging/config/params.rb
|
1056
|
+
- ext/packaging/lib/packaging/tar.rb
|
1057
|
+
- ext/packaging/lib/packaging/util.rb
|
1058
|
+
- ext/packaging/lib/packaging/util/date.rb
|
1059
|
+
- ext/packaging/lib/packaging/util/file.rb
|
1060
|
+
- ext/packaging/lib/packaging/util/jira.rb
|
1061
|
+
- ext/packaging/lib/packaging/util/net.rb
|
1062
|
+
- ext/packaging/lib/packaging/util/rake_utils.rb
|
1063
|
+
- ext/packaging/lib/packaging/util/serialization.rb
|
1064
|
+
- ext/packaging/lib/packaging/util/tool.rb
|
1065
|
+
- ext/packaging/lib/packaging/util/version.rb
|
1046
1066
|
- ext/packaging/packaging.rake
|
1067
|
+
- ext/packaging/spec/fixtures/config/ext/build_defaults.yaml
|
1068
|
+
- ext/packaging/spec/fixtures/config/ext/project_data.yaml
|
1069
|
+
- ext/packaging/spec/fixtures/config/params.yaml
|
1070
|
+
- ext/packaging/spec/fixtures/util/pre_tasks.yaml
|
1071
|
+
- ext/packaging/spec/lib/packaging/config_spec.rb
|
1072
|
+
- ext/packaging/spec/lib/packaging/tar_spec.rb
|
1073
|
+
- ext/packaging/spec/lib/packaging/util/file_spec.rb
|
1074
|
+
- ext/packaging/spec/lib/packaging/util/jira_spec.rb
|
1075
|
+
- ext/packaging/spec/lib/packaging/util/net_spec.rb
|
1076
|
+
- ext/packaging/spec/lib/packaging/util/rake_utils_spec.rb
|
1077
|
+
- ext/packaging/spec/lib/packaging/util/version_spec.rb
|
1078
|
+
- ext/packaging/spec/lib/packaging_spec.rb
|
1047
1079
|
- ext/packaging/spec/spec_helper.rb
|
1048
1080
|
- ext/packaging/spec/tasks/00_utils_spec.rb
|
1049
|
-
- ext/packaging/spec/tasks/build_object_spec.rb
|
1050
1081
|
- ext/packaging/static_artifacts/PackageInfo.plist
|
1051
1082
|
- ext/packaging/tasks/00_utils.rake
|
1052
|
-
- ext/packaging/tasks/10_setupvars.rake
|
1053
|
-
- ext/packaging/tasks/20_setupextravars.rake
|
1054
1083
|
- ext/packaging/tasks/30_metrics.rake
|
1055
1084
|
- ext/packaging/tasks/apple.rake
|
1056
1085
|
- ext/packaging/tasks/build.rake
|
@@ -1063,6 +1092,7 @@ files:
|
|
1063
1092
|
- ext/packaging/tasks/ips.rake
|
1064
1093
|
- ext/packaging/tasks/jenkins.rake
|
1065
1094
|
- ext/packaging/tasks/jenkins_dynamic.rake
|
1095
|
+
- ext/packaging/tasks/load_extras.rake
|
1066
1096
|
- ext/packaging/tasks/mock.rake
|
1067
1097
|
- ext/packaging/tasks/pe_deb.rake
|
1068
1098
|
- ext/packaging/tasks/pe_remote.rake
|
@@ -1079,7 +1109,7 @@ files:
|
|
1079
1109
|
- ext/packaging/tasks/sign.rake
|
1080
1110
|
- ext/packaging/tasks/tag.rake
|
1081
1111
|
- ext/packaging/tasks/tar.rake
|
1082
|
-
- ext/packaging/tasks/
|
1112
|
+
- ext/packaging/tasks/tickets.rake
|
1083
1113
|
- ext/packaging/tasks/update.rake
|
1084
1114
|
- ext/packaging/tasks/vendor_gems.rake
|
1085
1115
|
- ext/packaging/tasks/version.rake
|
@@ -2012,11 +2042,6 @@ files:
|
|
2012
2042
|
- spec/unit/util/zaml_spec.rb
|
2013
2043
|
- spec/unit/util_spec.rb
|
2014
2044
|
- spec/watchr.rb
|
2015
|
-
- bin/puppetca
|
2016
|
-
- bin/puppetd
|
2017
|
-
- bin/puppetmasterd
|
2018
|
-
- bin/puppetqd
|
2019
|
-
- bin/puppetrun
|
2020
2045
|
homepage: http://puppetlabs.com
|
2021
2046
|
licenses: []
|
2022
2047
|
post_install_message:
|
@@ -1,178 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
require 'spec_helper'
|
3
|
-
load_task '00_utils.rake'
|
4
|
-
load_task 'build.rake'
|
5
|
-
require 'yaml'
|
6
|
-
|
7
|
-
describe Build::BuildInstance do
|
8
|
-
Build_Params = [:apt_host,
|
9
|
-
:apt_repo_path,
|
10
|
-
:apt_repo_url,
|
11
|
-
:author,
|
12
|
-
:benchmark,
|
13
|
-
:build_date,
|
14
|
-
:build_defaults,
|
15
|
-
:build_dmg,
|
16
|
-
:build_doc,
|
17
|
-
:build_gem,
|
18
|
-
:build_ips,
|
19
|
-
:build_pe,
|
20
|
-
:builder_data_file,
|
21
|
-
:certificate_pem,
|
22
|
-
:cows,
|
23
|
-
:db_table,
|
24
|
-
:deb_build_host,
|
25
|
-
:debversion,
|
26
|
-
:debug,
|
27
|
-
:default_cow,
|
28
|
-
:default_mock,
|
29
|
-
:description,
|
30
|
-
:dmg_path,
|
31
|
-
:email,
|
32
|
-
:files,
|
33
|
-
:final_mocks,
|
34
|
-
:freight_conf,
|
35
|
-
:gem_default_executables,
|
36
|
-
:gem_dependencies,
|
37
|
-
:gem_description,
|
38
|
-
:gem_devel_dependencies,
|
39
|
-
:gem_development_dependencies,
|
40
|
-
:gem_excludes,
|
41
|
-
:gem_executables,
|
42
|
-
:gem_files,
|
43
|
-
:gem_forge_project,
|
44
|
-
:gem_name,
|
45
|
-
:gem_platform_dependencies,
|
46
|
-
:gem_rdoc_options,
|
47
|
-
:gem_require_path,
|
48
|
-
:gem_runtime_dependencies,
|
49
|
-
:gem_summary,
|
50
|
-
:gem_test_files,
|
51
|
-
:gemversion,
|
52
|
-
:gpg_key,
|
53
|
-
:gpg_name,
|
54
|
-
:homepage,
|
55
|
-
:ips_build_host,
|
56
|
-
:ips_host,
|
57
|
-
:ips_inter_cert,
|
58
|
-
:ips_package_host,
|
59
|
-
:ips_path,
|
60
|
-
:ips_repo,
|
61
|
-
:ips_store,
|
62
|
-
:ipsversion,
|
63
|
-
:jenkins_build_host,
|
64
|
-
:jenkins_packaging_job,
|
65
|
-
:jenkins_repo_path,
|
66
|
-
:metrics,
|
67
|
-
:metrics_url,
|
68
|
-
:name,
|
69
|
-
:notify,
|
70
|
-
:project,
|
71
|
-
:origversion,
|
72
|
-
:osx_build_host,
|
73
|
-
:packager,
|
74
|
-
:packaging_repo,
|
75
|
-
:packaging_url,
|
76
|
-
:pbuild_conf,
|
77
|
-
:pe_name,
|
78
|
-
:pe_version,
|
79
|
-
:pg_major_version,
|
80
|
-
:pre_tar_task,
|
81
|
-
:privatekey_pem,
|
82
|
-
:random_mockroot,
|
83
|
-
:rc_mocks,
|
84
|
-
:release,
|
85
|
-
:rpm_build_host,
|
86
|
-
:rpmrelease,
|
87
|
-
:rpmversion,
|
88
|
-
:ref,
|
89
|
-
:sign_tar,
|
90
|
-
:summary,
|
91
|
-
:tar_excludes,
|
92
|
-
:tar_host,
|
93
|
-
:tarball_path,
|
94
|
-
:team,
|
95
|
-
:templates,
|
96
|
-
:update_version_file,
|
97
|
-
:version,
|
98
|
-
:version_file,
|
99
|
-
:version_strategy,
|
100
|
-
:yum_host,
|
101
|
-
:yum_repo_path]
|
102
|
-
|
103
|
-
before :each do
|
104
|
-
@build = Build::BuildInstance.new
|
105
|
-
end
|
106
|
-
|
107
|
-
describe "#new" do
|
108
|
-
Build_Params.each do |param|
|
109
|
-
it "should have r/w accessors for #{param}" do
|
110
|
-
@build.should respond_to(param)
|
111
|
-
@build.should respond_to("#{param.to_s}=")
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
describe "#set_params_from_hash" do
|
117
|
-
good_params = { :yum_host => 'foo', :pe_name => 'bar' }
|
118
|
-
context "given a valid params hash #{good_params}" do
|
119
|
-
it "should set instance variable values for each param" do
|
120
|
-
good_params.each do |param, value|
|
121
|
-
@build.should_receive(:instance_variable_set).with("@#{param}", value)
|
122
|
-
end
|
123
|
-
@build.set_params_from_hash(good_params)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
bad_params = { :foo => 'bar' }
|
128
|
-
context "given an invalid params hash #{bad_params}" do
|
129
|
-
bad_params.each do |param, value|
|
130
|
-
it "should print a warning that param '#{param}' is not valid" do
|
131
|
-
@build.should_receive(:warn).with(/No build data parameter found for '#{param}'/)
|
132
|
-
@build.set_params_from_hash(bad_params)
|
133
|
-
end
|
134
|
-
|
135
|
-
it "should not try to set instance variable @:#{param}" do
|
136
|
-
@build.should_not_receive(:instance_variable_set).with("@#{param}", value)
|
137
|
-
@build.set_params_from_hash(bad_params)
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
mixed_params = { :sign_tar => TRUE, :baz => 'qux' }
|
143
|
-
context "given a hash with both valid and invalid params" do
|
144
|
-
it "should set the valid param" do
|
145
|
-
@build.should_receive(:instance_variable_set).with("@sign_tar", TRUE)
|
146
|
-
@build.set_params_from_hash(mixed_params)
|
147
|
-
end
|
148
|
-
|
149
|
-
it "should issue a warning that the invalid param is not valid" do
|
150
|
-
@build.should_receive(:warn).with(/No build data parameter found for 'baz'/)
|
151
|
-
@build.set_params_from_hash(mixed_params)
|
152
|
-
end
|
153
|
-
|
154
|
-
it "should not try to set instance variable @:baz" do
|
155
|
-
@build.should_not_receive(:instance_variable_set).with("@baz", "qux")
|
156
|
-
@build.set_params_from_hash(mixed_params)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
describe "#params" do
|
162
|
-
it "should return a hash containing keys for all build parameters" do
|
163
|
-
params = @build.params
|
164
|
-
Build_Params.each { |param| params.has_key?(param).should == TRUE }
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
describe "#params_to_yaml" do
|
169
|
-
it "should write a valid yaml file" do
|
170
|
-
file = mock('file')
|
171
|
-
File.should_receive(:open).with(anything(), 'w').and_yield(file)
|
172
|
-
file.should_receive(:puts).with(instance_of(String))
|
173
|
-
YAML.should_receive(:load_file).with(file)
|
174
|
-
expect { YAML.load_file(file) }.to_not raise_error
|
175
|
-
@build.params_to_yaml
|
176
|
-
end
|
177
|
-
end
|
178
|
-
end
|