Merge pull request #3842 from rickard-von-essen/file-builder-docs

Added file builder documentation.
This commit is contained in:
Rickard von Essen 2016-09-30 22:14:27 +02:00 committed by GitHub
commit c33a967ffc
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,52 @@
---
description: |
The `file` Packer builder is not really a builder, it just creates an
artifact from a file. It can be used to debug post-processors without
incurring high wait times. It does not run any provisioners.
layout: docs
page_title: File Builder
...
# File Builder
Type: `file`
The `file` Packer builder is not really a builder, it just creates an artifact
from a file. It can be used to debug post-processors without incurring high
wait times. It does not run any provisioners.
## Basic Example
Below is a fully functioning example. It doesn't do anything useful, since no
provisioners are defined, but it will connect to the specified host via ssh.
``` {.javascript}
{
"type": "file",
"content": "Lorem ipsum dolor sit amet",
"target": "dummy_artifact"
}
```
## Configuration Reference
Configuration options are organized below into two categories: required and
optional. Within each category, the available options are alphabetized and
described.
Any [communicator](/docs/templates/communicator.html) defined is ignored.
### Required:
- `target` (string) - The path for a file which will be copied as the
artifact.
### Optional:
You can only define one of `source` or `content`. If none of them is
defined the artifact will be empty.
- `source` (string) - The path for a file which will be copied as the
artifact.
- `content` (string) - The content that will be put into the artifact.

View File

@ -39,6 +39,7 @@
<li><a href="/docs/builders/azure.html">Azure Resource Manager</a></li> <li><a href="/docs/builders/azure.html">Azure Resource Manager</a></li>
<li><a href="/docs/builders/digitalocean.html">DigitalOcean</a></li> <li><a href="/docs/builders/digitalocean.html">DigitalOcean</a></li>
<li><a href="/docs/builders/docker.html">Docker</a></li> <li><a href="/docs/builders/docker.html">Docker</a></li>
<li><a href="/docs/builders/file.html">File</a></li>
<li><a href="/docs/builders/googlecompute.html">Google Compute Engine</a></li> <li><a href="/docs/builders/googlecompute.html">Google Compute Engine</a></li>
<li><a href="/docs/builders/null.html">Null</a></li> <li><a href="/docs/builders/null.html">Null</a></li>
<li><a href="/docs/builders/openstack.html">OpenStack</a></li> <li><a href="/docs/builders/openstack.html">OpenStack</a></li>