Commit 9cd57246 authored by Chris Bednarski's avatar Chris Bednarski

Updated docs, fix artifact bug

parent e81378ac
...@@ -29,7 +29,7 @@ func (*Artifact) Id() string { ...@@ -29,7 +29,7 @@ func (*Artifact) Id() string {
} }
func (a *Artifact) Files() []string { func (a *Artifact) Files() []string {
return a.files return []string{a.Path}
} }
func (a *Artifact) String() string { func (a *Artifact) String() string {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
layout: "docs" layout: "docs"
page_title: "compress Post-Processor" page_title: "compress Post-Processor"
description: |- description: |-
The Packer compress post-processor takes an artifact with files (such as from VMware or VirtualBox) and gzip compresses the artifact into a single archive. The Packer compress post-processor takes an artifact with files (such as from VMware or VirtualBox) and compresses the artifact into a single archive.
--- ---
# Compress Post-Processor # Compress Post-Processor
...@@ -14,22 +14,33 @@ VMware or VirtualBox) and compresses the artifact into a single archive. ...@@ -14,22 +14,33 @@ VMware or VirtualBox) and compresses the artifact into a single archive.
## Configuration ## Configuration
### Required:
You must specify the output filename. The archive format is derived from the filename. You must specify the output filename. The archive format is derived from the filename.
* `output` (required, string) - The path to save the compressed archive. The archive format is inferred from the filename. E.g. `.tar.gz` will be a gzipped tarball. `.zip` will be a zip file. If the extension can't be detected packer defaults to `.tar.gz` behavior but will not change the filename. * `output` (string) - The path to save the compressed archive. The archive
format is inferred from the filename. E.g. `.tar.gz` will be a gzipped
tarball. `.zip` will be a zip file. If the extension can't be detected packer
defaults to `.tar.gz` behavior but will not change the filename.
If you are executing multiple builders in parallel you should make sure
`output` is unique for each one. For example `packer_{{.BuildName}}_{{.Provider}}.zip`.
If you are executing multiple builders in parallel you should make sure `output` is unique for each one. For example `packer_{{.BuildName}}_{{.Provider}}.zip`. ### Optional:
If you want more control over how the archive is created you can specify the following settings: If you want more control over how the archive is created you can specify the following settings:
* `compression_level` (optional, integer) - Specify the compression level, for algorithms that support it, from 1 through 9 inclusive. Typically higher compression levels take longer but produce smaller files. Default if omitted is 6 * `compression_level` (integer) - Specify the compression level, for algorithms
* `keep_input_artifact` (optional, bool) - Keep source files; defaults to false that support it, from 1 through 9 inclusive. Typically higher compression
levels take longer but produce smaller files. Defaults to `6`
* `keep_input_artifact` (bool) - Keep source files; defaults to `false`
## Supported Formats ### Supported Formats
Supported file extensions include `.zip`, `.tar`, `.gz`, `.tar.gz`, `.lz4` and `.tar.lz4`. Note that `.gz` and `.lz4` will fail if you have multiple files to compress. Supported file extensions include `.zip`, `.tar`, `.gz`, `.tar.gz`, `.lz4` and `.tar.lz4`. Note that `.gz` and `.lz4` will fail if you have multiple files to compress.
## Example ## Examples
Some minimal examples are shown below, showing only the post-processor configuration: Some minimal examples are shown below, showing only the post-processor configuration:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment