Add a Build class

This commit adds a Build class to the packaging repo. The Build class is the
beginning of a shift to using more encapsulated, easier to follow logic in
packaaging. It offers us the opportunity to track state much more easily than
before. The new Build class contains instance variables for all of the
packaging repo's many tracked data, as well as functionality to load these
variables from yaml files, return them as a hash, and most importantly, write
them back out to yaml. This will allow us to cease using a mess of environment
variables when issuing remote commands. Instead of having to constantly update
which params are sent as environment variables to remote tasks, this allows us
to send the entire state of the build object along with our desired build task,
preventing much of the trial and error of the current approach.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
assign variables to build object in 10_setupvars.rake

This commit updates 10_setupvars.rake to create a BuildInstance object and
assign our various settings to it, rather than global instance variables. We
defeated encapsulation at the origin of the packaging repo, but here it makes a
defiant return. This commit also modifies variable loading to load everything
from a yaml file we pass in the path to with the PARAMS_FILE environment
variable. This takes advantage of the BuildInstance ability to read in
attributes from a yaml file and write them back out again. We also don't need
explicit parameter setting any more for the most part, since the build object
will read in for us, but we keep the ability to override some parameters with
environment variables.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
1 to 1 mapping in params and variable names

Why I ever decided to name the instance variables something other than
their respective yaml file entries is beyond me. This commit fixes this
by replacing all instances of @name with @project, which is what it is
in the project_data.yaml file.
Update 20_setupextrasvars.rake for Build object

This commit updates the loading of extras vars in lieu of the new build
object architecture. This allows us to read in data from the extras
files as needed without worrying if specific parameters are defined or
not. The currently 'overrideable' params are still kept as such to make
sure we can still override as necessary.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Replace instance vars with build.<attr>

This commit replaces instance variable evaluations throughout the tasks
with accessor calls to the build object.
Remove environment variable passing to remote tasks

This commit adds a utility method to send the build parameters to a
remote host and return the path on the remote filesystem as a string.
This method is then used in the remote tasks to determine various
parameters required for the build. This gets us out of the business of
passing along environment variables to the remote tasks, a source of
much pain as the remote tasks have become more complex.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Add DEBUG printing of all variables
Set instance variables for backwards compatibility
Make @name = @project for backwards compatibility

This commit also adds some documentation to 10_setupvars.rake