From ed8627771458b7d35d88ba168fb3f90605086d5e Mon Sep 17 00:00:00 2001 From: Jake Champlin Date: Thu, 12 Nov 2015 18:06:10 -0500 Subject: [PATCH 1/2] Update Post-Processor Docs Update Post-Processor docs to clarify sequences in packer templates. --- .../templates/post-processors.html.markdown | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/website/source/docs/templates/post-processors.html.markdown b/website/source/docs/templates/post-processors.html.markdown index 2c71e6664..7fd7fa248 100644 --- a/website/source/docs/templates/post-processors.html.markdown +++ b/website/source/docs/templates/post-processors.html.markdown @@ -82,6 +82,8 @@ sequence definition. Sequence definitions are used to chain together multiple post-processors. An example is shown below, where the artifact of a build is compressed then uploaded, but the compressed result is not kept. +It is very important that any post processors that need to be ran in order, be sequenced! + ``` {.javascript} { "post-processors": [ @@ -96,6 +98,27 @@ compressed then uploaded, but the compressed result is not kept. As you may be able to imagine, the **simple** and **detailed** definitions are simply shortcuts for a **sequence** definition of only one element. +## Creating Vagrant Boxes in Atlas + +It is important to sequence post processors when creating and uploading vagrant boxes to Atlas via Packer. Using a sequence will ensure that the post processors are ran in order and creates the vagrant box prior to uploading the box to Atlas. + +``` {.javascript} +{ + "post-processors": [ + [ + { + "type": "vagrant", + "keep_input_artifact": false + }, + { + "type": "atlas", + ... + } + ] + ] +} +``` + ## Input Artifacts When using post-processors, the input artifact (coming from a builder or another From 912111ca428b398f5f4b970ef56602a6fe5b279b Mon Sep 17 00:00:00 2001 From: Jake Champlin Date: Thu, 12 Nov 2015 18:32:31 -0500 Subject: [PATCH 2/2] Add full example and link to Atlas Post Processor --- .../docs/templates/post-processors.html.markdown | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/website/source/docs/templates/post-processors.html.markdown b/website/source/docs/templates/post-processors.html.markdown index 7fd7fa248..c6926b5f1 100644 --- a/website/source/docs/templates/post-processors.html.markdown +++ b/website/source/docs/templates/post-processors.html.markdown @@ -112,13 +112,21 @@ It is important to sequence post processors when creating and uploading vagrant }, { "type": "atlas", - ... + "only": ["virtualbox-iso"], + "artifact": "dundlermifflin/dwight-schrute", + "artifact_type": "vagrant.box", + "metadata": { + "provider": "virtualbox", + "version": "0.0.1" + } } ] ] } ``` +More documentation on the Atlas post-processor can be found [here](/docs/post-processors/atlas.html) + ## Input Artifacts When using post-processors, the input artifact (coming from a builder or another