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