Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify doubly-nested array use in post-processors #1997

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 22 additions & 19 deletions website/source/docs/post-processors/vagrant-cloud.html.markdown
Expand Up @@ -78,31 +78,34 @@ the box will not be uploaded to the Vagrant Cloud.
## Use with Vagrant Post-Processor

You'll need to use the Vagrant post-processor before using this post-processor.
An example configuration is below. Note the use of the array specifying
the execution order.
An example configuration is below. Note the use of a doubly-nested array, which
ensures that the Vagrant Cloud post-processor is run after the Vagrant
post-processor.

```javascript
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standardized on 2 spaces here, but would be happy to reformat it for 4

"variables": {
"version": "",
"cloud_token": ""
},
"builders": [{
"variables": {
"version": "",
"cloud_token": ""
},
"builders": [{
// ...
}],
"post-processors": [
[{
"type": "vagrant",
"include": ["image.iso"],
"vagrantfile_template": "vagrantfile.tpl",
"output": "proxycore_{{.Provider}}.box"
}],
"post-processors": [
[
{
"type": "vagrant",
"include": ["image.iso"],
"vagrantfile_template": "vagrantfile.tpl",
"output": "proxycore_{{.Provider}}.box"
},
{
"type": "vagrant-cloud",
"box_tag": "hashicorp/precise64",
"access_token": "{{user `cloud_token`}}",
"version": "{{user `version`}}"
}]
"type": "vagrant-cloud",
"box_tag": "hashicorp/precise64",
"access_token": "{{user `cloud_token`}}",
"version": "{{user `version`}}"
}
]
]
}
```