Commit 8e9e5969 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

website: update latest post-processor API

parent f78cbb45
......@@ -38,7 +38,7 @@ what each method should do.
<pre class="prettyprint">
type PostProcessor interface {
Configure(interface{}) error
PostProcess(Ui, Artifact) (Artifact, error)
PostProcess(Ui, Artifact) (a Artifact, keep bool, err error)
}
</pre>
......@@ -79,3 +79,15 @@ a "compress" post-processor that is responsible for compressing files,
the transformation would be taking the `Files()` from the original artifact,
compressing them, and creating a new artifact with a single file: the
compressed archive.
The result signature of this method is `(Artifact, bool, error)`. Each
return value is explained below:
* `Artifact` - The newly created artifact if no errors occurred.
* `bool` - If true, the input artifact will forcefully be kept. By default,
Packer typically deletes all input artifacts, since the user doesn't generally
want intermediary artifacts. However, some post-processors depend on the
previous artifact existing. If this is `true`, it forces packer to keep the
artifact around.
* `error` - Non-nil if there was an error in any way. If this is the case,
the other two return values are ignored.
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