2016-01-14 21:52:23 +01:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"aws_access_key_id": "{{ env `AWS_ACCESS_KEY_ID` }}",
|
|
|
|
"aws_secret_access_key": "{{ env `AWS_SECRET_ACCESS_KEY` }}",
|
|
|
|
"aws_region": "{{ env `AWS_REGION` }}",
|
|
|
|
"fastly_api_key": "{{ env `FASTLY_API_KEY` }}"
|
|
|
|
},
|
|
|
|
"builders": [
|
|
|
|
{
|
|
|
|
"type": "docker",
|
2017-03-08 20:27:47 +01:00
|
|
|
"image": "hashicorp/middleman-hashicorp:0.3.12",
|
2016-10-31 23:36:33 +01:00
|
|
|
"discard": "true",
|
|
|
|
"run_command": ["-d", "-i", "-t", "{{ .Image }}", "/bin/sh"]
|
2016-01-14 21:52:23 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "file",
|
|
|
|
"source": ".",
|
2016-10-31 23:36:33 +01:00
|
|
|
"destination": "/website"
|
2016-01-14 21:52:23 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "shell",
|
|
|
|
"environment_vars": [
|
|
|
|
"AWS_ACCESS_KEY_ID={{ user `aws_access_key_id` }}",
|
|
|
|
"AWS_SECRET_ACCESS_KEY={{ user `aws_secret_access_key` }}",
|
|
|
|
"AWS_REGION={{ user `aws_region` }}",
|
|
|
|
"FASTLY_API_KEY={{ user `fastly_api_key` }}"
|
|
|
|
],
|
|
|
|
"inline": [
|
2016-10-31 23:36:33 +01:00
|
|
|
"bundle check || bundle install",
|
2016-01-14 21:52:23 +01:00
|
|
|
"bundle exec middleman build",
|
2016-10-31 23:36:33 +01:00
|
|
|
"/bin/sh ./scripts/deploy.sh"
|
2016-01-14 21:52:23 +01:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|