-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build metadata to boxes and build artifacts.
For each Packer template that is run via `bin/bento`, a JSON file of build metadata will be written to the `builds/` directory, which looks like the following (using the `ubuntu-14.100i386` template as an example): { "name": "ubuntu-14.10-i386", "version": "2.0.20150528211301", "build_timestamp": "20150528211301", "git_revision": "6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b", "box_basename": "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b", "atlas_org": "chef", "arch": "32", "template": "ubuntu-14.10-i386", "md5": { "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.parallels.box": "e3a18b096cddc73384f0912c3a65ebad", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.virtualbox.box": "106f2ca4e6da18663e7216a72dd62e56", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.vmware.box": "8990550bc2a0e2e7515ed3433ec54b46" }, "sha256": { "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.parallels.box": "0a0e3c9369de005a456f0cd7d94ba4d4b562d7231c11d9c5af8e40ef77131d3d", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.virtualbox.box": "0c23480a99294aea8f42daea2576a41820ec3bebb99a9d0a8ab72a3de1b24137", "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.vmware.box": "9128b66ef4bae323a123fcdd0be5a598bb538f822295ab6bf043e7630a49b608" } } In addition to the "sidecar" metadata file, a trimmed down version will is added to each Vagrant box in `/etc/bento-metadata.json`. Using the example above, here is what the file would look like: { "name": "ubuntu-14.10-i386", "version": "2.0.20150528211301", "build_timestamp": "20150528211301", "git_revision": "6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b_dirty", "box_basename": "chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b_dirty", "atlas_org": "chef", "arch": "32", "template": "ubuntu-14.10-i386" } Also note that this changes the file naming scheme of the resulting box artifacts in an effort to host multiple builds of the same templates in one directory while maintaining enough information about the box within the filename itself. Using the same example as above, the VirtualBox provider box name is: chef__ubuntu-14.10-i386-2.0.20150528211301.git.6b23dd8d8ff0fb9cc4473f510bc3c54f0b415d1b.virtualbox.box Which uses the following recipe to construct the filename: * `atlas_org` value (default: `"chef"`) * double underscore, which could be later interpreted as a slash (`/`) for an Atalas box name * `name` value which may or may not equal the name of the template (captured as the `template` value) * a dash * `version` value, which removes the last digit in a version string and replaces it with the `build_timestamp` (a Year/Month/Day/Hour/Minute/Second format in UTC timezone) * a period * the string `"git"` * a period * `git_revision` value, which will append `"_dirty"` if the current state of the git repository is not completely clean (i.e., there are uncommitted changes which happens in active development) * a period * the value of the `{{.Provider}}` Packer variable, being one of `"virtualbox"`, `"vmware"`, or `"parallels"` * finished with `".box"` Closes #364
- Loading branch information
Showing
50 changed files
with
801 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.