diff --git a/website/source/docs/command-line/machine-readable.html.markdown b/website/source/docs/command-line/machine-readable.html.markdown index b5f5b5b71..9db4e5451 100644 --- a/website/source/docs/command-line/machine-readable.html.markdown +++ b/website/source/docs/command-line/machine-readable.html.markdown @@ -77,7 +77,7 @@ returns become a literal `\r`. ## Message Types The set of machine-readable message types can be found in the -[machine-readable format](#) +[machine-readable format](/docs/machine-readable/index.html) complete documentation section. This section contains documentation on all the message types exposed by Packer core as well as all the components that ship with Packer by default. diff --git a/website/source/docs/machine-readable/command-build.html.markdown b/website/source/docs/machine-readable/command-build.html.markdown new file mode 100644 index 000000000..115133285 --- /dev/null +++ b/website/source/docs/machine-readable/command-build.html.markdown @@ -0,0 +1,125 @@ +--- +layout: "docs_machine_readable" +page_title: "Command: build - Machine-Readable Reference" +--- + +# Build Command Types + +These are the machine-readable types that exist as part of the output +of `packer build`. + +
+
artifact (>= 2)
+
+

+ Information about an artifact of the targetted item. This is a + fairly complex (but uniform!) machine-readable type that contains + subtypes. The subtypes are documented within this page in the + syntax of "artifact subtype: SUBTYPE". The number of arguments within + that subtype is in addition to the artifact args. +

+ +

+ Data 1: index - The zero-based index of the + artifact being described. This goes up to "artifact-count" (see + below). +

+

+ Data 2: subtype - The subtype that describes + the remaining arguments. See the documentation for the + subtype docs throughout this page. +

+

+ Data 3..n: subtype data - Zero or more additional + data points related to the subtype. The exact count and meaning + of this subtypes comes from the subtype documentation. +

+
+ +
artifact-count (1)
+
+

+ The number of artifacts associated with the given target. +

+ +

+ Data 1: count - The number of artifacts as + a base 10 integer. +

+
+ +
artifact subtype: builder-id (1)
+
+

+ The unique ID of the builder that created this artifact. +

+ +

+ Data 1: id - The unique ID of the builder. +

+
+ +
artifact subtype: file (2)
+
+

+ A single file associated with the artifact. There are 0 to + "files-count" of these entries to describe every file that is + part of the artifact. +

+ +

+ Data 1: index - Zero-based index of the file. + This goes from 0 to "files-count" minus one. +

+ +

+ Data 2: filename - The filename. +

+
+ +
artifact subtype: files-count (1)
+
+

+ The number of files associated with this artifact. Not all + artifacts have files associated with it. +

+ +

+ Data 1: count - The number of files. +

+
+ +
artifact subtype: id (1)
+
+

+ The ID (if any) of the artifact that was built. Not all artifacts + have associated IDs. For example, AMIs built have IDs associated + with them, but VirtualBox images do not. The exact format of the ID + is specific to the builder. +

+ +

+ Data 1: id - The ID of the artifact. +

+
+ +
artifact subtype: nil (0)
+
+

+ If present, this means that the artifact was nil, or that the targetted + build completed successfully but no artifact was created. +

+
+ +
artifact subtype: string (1)
+
+

+ The human-readable string description of the artifact provided by + the artifact itself. +

+ +

+ Data 1: string - The string output for the artifact. +

+
+
diff --git a/website/source/docs/machine-readable/command-version.html.markdown b/website/source/docs/machine-readable/command-version.html.markdown new file mode 100644 index 000000000..a84a49762 --- /dev/null +++ b/website/source/docs/machine-readable/command-version.html.markdown @@ -0,0 +1,45 @@ +--- +layout: "docs_machine_readable" +page_title: "Command: version - Machine-Readable Reference" +--- + +# Version Command Types + +These are the machine-readable types that exist as part of the output +of `packer version`. + +
+
version (1)
+
+

The version number of Packer running.

+ +

+ Data 1: version - The version of Packer running, + only including the major, minor, and patch versions. Example: + "0.2.4". +

+
+ +
version-commit (1)
+
+

The SHA1 of the Git commit that built this version of Packer.

+ +

+ Data 1: commit SHA1 - The SHA1 of the commit. +

+
+ +
version-prerelease (1)
+
+

+ The prerelease tag (if any) for the running version of Packer. This + can be "beta", "dev", "alpha", etc. If this is empty, you can assume + it is a release version running. +

+ +

+ Data 1: prerelease name - The name of the + prerelease tag. +

+
+
diff --git a/website/source/docs/machine-readable/general.html.markdown b/website/source/docs/machine-readable/general.html.markdown new file mode 100644 index 000000000..8f604e56e --- /dev/null +++ b/website/source/docs/machine-readable/general.html.markdown @@ -0,0 +1,29 @@ +--- +layout: "docs_machine_readable" +page_title: "General Types - Machine-Readable Reference" +--- + +# General Types + +These are the machine-readable types that can appear in almost any +machine-readable output and are provided by Packer core itself. + +
+
ui (2)
+
+

+ Specifies the output and type of output that would've normally + gone to the console if Packer wasn't running in human-readable + mode. +

+ +

+ Data 1: type - The type of UI message that would've + been outputted. Can be "say", "message", or "error". +

+

+ Data 2: output - The UI message that would have + been outputted. +

+
+
diff --git a/website/source/docs/machine-readable/index.html.markdown b/website/source/docs/machine-readable/index.html.markdown new file mode 100644 index 000000000..f0ac3e112 --- /dev/null +++ b/website/source/docs/machine-readable/index.html.markdown @@ -0,0 +1,30 @@ +--- +layout: "docs_machine_readable" +page_title: "Machine-Readable Reference" +--- + +# Machine-Readable Reference + +This is the reference for the various message categories for Packer +[machine-readable output](/docs/command-line/machine-readable.html). +Please read that page if you're unfamiliar with the general format and +usage for the machine-readable output. + +The layout of this reference is split into where the types come from. +There are a set of core types that are from Packer core itself. Then +there are types that come from various components of Packer such as the +builders, provisioners, and more. + +Within each section, the format of the documentation is the following: + +
+ +
+
type-name (data-count)
+
+

Description of the type.

+

+ Data 1: name - Description. +

+
+
diff --git a/website/source/layouts/docs_machine_readable.erb b/website/source/layouts/docs_machine_readable.erb new file mode 100644 index 000000000..1fe96abf8 --- /dev/null +++ b/website/source/layouts/docs_machine_readable.erb @@ -0,0 +1,14 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> +

Docs

+ + + <% end %> + <%= yield %> +<% end %> diff --git a/website/source/stylesheets/_styles.scss b/website/source/stylesheets/_styles.scss index ebfc7f8f7..777e00495 100644 --- a/website/source/stylesheets/_styles.scss +++ b/website/source/stylesheets/_styles.scss @@ -122,6 +122,18 @@ a { } +dt { + font-size: 18px; +} + +dd { + font-family: $serif; + font-size: 17px; + line-height: 1.5; + letter-spacing: 1px; + margin-bottom: 30px; +} + ul, ol { margin: 0;