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