puppetlabs/packaging — pull request #102 by MosesMendoza (2013-01-25 17:58:34+00:00)
Title: Add build class, rework data model

This PR reworks the packaging repo fairly significantly. This PR adds a BuildInstance class to packaging, whose purpose it is to store, display, write and ingest data about build parameters. When a build task is invoked, a BuildInstance object is created and populated with data from the build_defaults and project_data yaml files, and if appropriate, also from the extras build_data. The build object includes behavior for writing all build parameters to a yaml file, printing to string, and reading them in from yaml files. A new environment variable, PARAMS_FILE, can be passed as the path to a complete params file, and the build object will solely use this for data instead of build_defaults and project_data. The implications are felt with remote tasks. This PR modifies the remote task system to write a params file locally with all known build parameters, ship it to the remote builder with the package, and use it to populate build parameters instead of the current terribly confusing mix of local and remote environment variables and yaml files. This PR also paves the way for a queuing system, because the params files contain almost everything necessary to complete a build, though that will be a separate PR entirely. The changes in this PR are intended to be backwards compatible with current projects using the packaging repo. This should probably be reviewed fairly closely before merging.