github.com/jerryclinesmith/packer@v0.3.7/website/source/docs/machine-readable/command-build.html.markdown (about)

     1  ---
     2  layout: "docs_machine_readable"
     3  page_title: "Command: build - Machine-Readable Reference"
     4  ---
     5  
     6  # Build Command Types
     7  
     8  These are the machine-readable types that exist as part of the output
     9  of `packer build`.
    10  
    11  <dl>
    12  	<dt>artifact (>= 2)</dt>
    13  	<dd>
    14  		<p>
    15  		Information about an artifact of the targetted item. This is a
    16  		fairly complex (but uniform!) machine-readable type that contains
    17  		subtypes. The subtypes are documented within this page in the
    18  		syntax of "artifact subtype: SUBTYPE". The number of arguments within
    19  		that subtype is in addition to the artifact args.
    20  		</p>
    21  
    22  		<p>
    23  		<strong>Data 1: index</strong> - The zero-based index of the
    24  		artifact being described. This goes up to "artifact-count" (see
    25  		below).
    26  		</p>
    27  		<p>
    28  		<strong>Data 2: subtype</strong> - The subtype that describes
    29  		the remaining arguments. See the documentation for the
    30  		subtype docs throughout this page.
    31  		</p>
    32  		<p>
    33  		<strong>Data 3..n: subtype data</strong> - Zero or more additional
    34  		data points related to the subtype. The exact count and meaning
    35  		of this subtypes comes from the subtype documentation.
    36  		</p>
    37  	</dd>
    38  
    39  	<dt>artifact-count (1)</dt>
    40  	<dd>
    41  		<p>
    42  		The number of artifacts associated with the given target. This
    43  		will always be outputted _before_ any other artifact information,
    44  		so you're able to know how many upcoming artifacts to look for.
    45  		</p>
    46  
    47  		<p>
    48  		<strong>Data 1: count</strong> - The number of artifacts as
    49  		a base 10 integer.
    50  		</p>
    51  	</dd>
    52  
    53  	<dt>artifact subtype: builder-id (1)</dt>
    54  	<dd>
    55  		<p>
    56  		The unique ID of the builder that created this artifact.
    57  		</p>
    58  
    59  		<p>
    60  		<strong>Data 1: id</strong> - The unique ID of the builder.
    61  		</p>
    62  	</dd>
    63  
    64  	<dt>artifact subtype: end (0)</dt>
    65  	<dd>
    66  		<p>
    67  		The last machine-readable output line outputted for an artifact.
    68  		This is a sentinel value so you know that no more data related to
    69  		the targetted artifact will be outputted.
    70  		</p>
    71  	</dd>
    72  
    73  	<dt>artifact subtype: file (2)</dt>
    74  	<dd>
    75  		<p>
    76  		A single file associated with the artifact. There are 0 to
    77  		"files-count" of these entries to describe every file that is
    78  		part of the artifact.
    79  		</p>
    80  
    81  		<p>
    82  		<strong>Data 1: index</strong> - Zero-based index of the file.
    83  		This goes from 0 to "files-count" minus one.
    84  		</p>
    85  
    86  		<p>
    87  		<strong>Data 2: filename</strong> - The filename.
    88  		</p>
    89  	</dd>
    90  
    91  	<dt>artifact subtype: files-count (1)</dt>
    92  	<dd>
    93  		<p>
    94  		The number of files associated with this artifact. Not all
    95  		artifacts have files associated with it.
    96  		</p>
    97  
    98  		<p>
    99  		<strong>Data 1: count</strong> - The number of files.
   100  		</p>
   101  	</dd>
   102  
   103  	<dt>artifact subtype: id (1)</dt>
   104  	<dd>
   105  		<p>
   106  		The ID (if any) of the artifact that was built. Not all artifacts
   107  		have associated IDs. For example, AMIs built have IDs associated
   108  		with them, but VirtualBox images do not. The exact format of the ID
   109  		is specific to the builder.
   110  		</p>
   111  
   112  		<p>
   113  		<strong>Data 1: id</strong> - The ID of the artifact.
   114  		</p>
   115  	</dd>
   116  
   117  	<dt>artifact subtype: nil (0)</dt>
   118  	<dd>
   119  		<p>
   120  		If present, this means that the artifact was nil, or that the targetted
   121  		build completed successfully but no artifact was created.
   122  		</p>
   123  	</dd>
   124  
   125  	<dt>artifact subtype: string (1)</dt>
   126  	<dd>
   127  		<p>
   128  		The human-readable string description of the artifact provided by
   129  		the artifact itself.
   130  		</p>
   131  
   132  		<p>
   133  		<strong>Data 1: string</strong> - The string output for the artifact.
   134  		</p>
   135  	</dd>
   136  
   137  	<dt>error-count (1)</dt>
   138  	<dd>
   139  		<p>
   140  		The number of errors that occurred during the build. This will
   141  		always be outputted before any errors so you know how many are coming.
   142  		</p>
   143  
   144  		<p>
   145  		<strong>Data 1: count</strong> - The number of build errors as
   146  		a base 10 integer.
   147  		</p>
   148  	</dd>
   149  
   150  	<dt>error (1)</dt>
   151  	<dd>
   152  		<p>
   153  		A build error that occurred. The target of this output will be
   154  		the build that had the error.
   155  		</p>
   156  
   157  		<p>
   158  		<strong>Data 1: error</strong> - The error message as a string.
   159  		</p>
   160  	</dd>
   161  </dl>