github.com/yoctocloud/packer@v0.6.2-0.20160520224004-e11a0a18423f/website/source/docs/templates/push.html.md (about) 1 --- 2 description: | 3 Within the template, the push section configures how a template can be pushed to 4 a remote build service. 5 layout: docs 6 page_title: 'Templates: Push' 7 ... 8 9 # Templates: Push 10 11 Within the template, the push section configures how a template can be 12 [pushed](/docs/command-line/push.html) to a remote build service. 13 14 Push configuration is responsible for defining what files are required to build 15 this template, what the name of build configuration is in the build service, 16 etc. 17 18 The only build service that Packer can currently push to is 19 [Atlas](https://atlas.hashicorp.com) by HashiCorp. Support for other build 20 services will come in the form of plugins in the future. 21 22 Within a template, a push configuration section looks like this: 23 24 ``` {.javascript} 25 { 26 "push": { 27 // ... push configuration here 28 } 29 } 30 ``` 31 32 ## Configuration Reference 33 34 There are many configuration options available for the builder. They are 35 segmented below into two categories: required and optional parameters. Within 36 each category, the available configuration keys are alphabetized. 37 38 ### Required 39 40 - `name` (string) - Name of the build configuration in the build service. If 41 this doesn't exist, it will be created (by default). Note that the name 42 cannot contain dots. `[a-zA-Z0-9-_/]+` are safe. 43 44 ### Optional 45 46 - `address` (string) - The address of the build service to use. By default 47 this is `https://atlas.hashicorp.com`. 48 49 - `base_dir` (string) - The base directory of the files to upload. This will 50 be the current working directory when the build service executes 51 your template. This path is relative to the template. 52 53 - `include` (array of strings) - Glob patterns to include relative to the 54 `base_dir`. If this is specified, only files that match the include pattern 55 are included. 56 57 - `exclude` (array of strings) - Glob patterns to exclude relative to the 58 `base_dir`. 59 60 - `token` (string) - An access token to use to authenticate to the 61 build service. 62 63 - `vcs` (boolean) - If true, Packer will detect your VCS (if there is one) and 64 only upload the files that are tracked by the VCS. This is useful for 65 automatically excluding ignored files. This defaults to false. 66 67 ## Examples 68 69 A push configuration section with minimal options: 70 71 ``` {.javascript} 72 { 73 "push": { 74 "name": "hashicorp/precise64" 75 } 76 } 77 ``` 78 79 A push configuration specifying Packer to inspect the VCS and list individual 80 files to include: 81 82 ``` {.javascript} 83 { 84 "push": { 85 "name": "hashicorp/precise64", 86 "vcs": true, 87 "include": [ 88 "other_file/outside_of.vcs" 89 ] 90 } 91 } 92 ```