From 4ad77b9d9a492abd0c5ebf29b3d7b31250883ce1 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 1 Jul 2013 11:35:09 -0700 Subject: [PATCH] website: update latest post-processor API --- .../docs/extend/post-processor.html.markdown | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/website/source/docs/extend/post-processor.html.markdown b/website/source/docs/extend/post-processor.html.markdown index 8148a4a0e..bec75b06b 100644 --- a/website/source/docs/extend/post-processor.html.markdown +++ b/website/source/docs/extend/post-processor.html.markdown @@ -38,7 +38,7 @@ what each method should do.
 type PostProcessor interface {
 	Configure(interface{}) error
-	PostProcess(Ui, Artifact) (Artifact, error)
+	PostProcess(Ui, Artifact) (a Artifact, keep bool, err error)
 }
 
@@ -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.