github.com/aspring/packer@v0.8.1-0.20150629211158-9db281ac0f89/website/source/docs/templates/push.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "Templates: Push" 4 description: |- 5 Within the template, the push section configures how a template can be 6 pushed to a remote build service. 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 15 to build this template, what the name of build configuration is in the 16 build service, 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. 41 If this doesn't exist, it will be created (by default). 42 43 ### Optional 44 45 * `address` (string) - The address of the build service to use. By default 46 this is `https://atlas.hashicorp.com`. 47 48 * `base_dir` (string) - The base directory of the files to upload. This 49 will be the current working directory when the build service executes your 50 template. This path is relative to the template. 51 52 * `include` (array of strings) - Glob patterns to include relative to 53 the `base_dir`. If this is specified, only files that match the include 54 pattern are included. 55 56 * `exclude` (array of strings) - Glob patterns to exclude relative to 57 the `base_dir`. 58 59 * `token` (string) - An access token to use to authenticate to the build 60 service. 61 62 * `vcs` (bool) - If true, Packer will detect your VCS (if there is one) 63 and only upload the files that are tracked by the VCS. This is useful 64 for automatically excluding ignored files. This defaults to false. 65 66 ## Examples 67 68 A push configuration section with minimal options: 69 70 ```javascript 71 { 72 "push": { 73 "name": "hashicorp/precise64" 74 } 75 } 76 ``` 77 78 A push configuration specifying Packer to inspect the VCS and list individual 79 files to include: 80 81 ```javascript 82 { 83 "push": { 84 "name": "hashicorp/precise64", 85 "vcs": true, 86 "include": [ 87 "other_file/outside_of.vcs" 88 ] 89 } 90 } 91 ``` 92 93 ~> **Variable interpolation** is not currently possible in Packer push 94 configurations. This will be fixed in an upcoming release.