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