forked from kubenow/image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-gce.json
41 lines (41 loc) · 1.02 KB
/
build-gce.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
"variables": {
"image_name": "{{env `IMAGE_NAME`}}",
"source_image_name": "{{env `GCE_SOURCE_IMAGE_NAME`}}",
"network": "{{env `PACKER_NETWORK`}}",
"account_file": "{{env `GCE_ACCOUNT_FILE_PATH`}}",
"zone": "{{env `GCE_ZONE`}}",
"project_id": "{{env `GCE_PROJECT_ID`}}",
"current_version": "{{env `CURRENT_VERSION`}}"
},
"builders": [
{
"name": "all",
"type": "googlecompute",
"image_name": "{{user `image_name`}}",
"source_image": "{{user `source_image_name`}}",
"ssh_username": "ubuntu",
"account_file": "{{user `account_file`}}",
"project_id": "{{user `project_id`}}",
"zone": "{{user `zone`}}"
}
],
"provisioners": [
{
"type": "shell",
"script": "{{pwd}}/requirements.sh"
}
],
"post-processors": [
{
"type": "googlecompute-export",
"paths": [
"gs://kubenow-images/{{user `image_name`}}.tar.gz"
]
},
{
"type": "shell-local",
"script": "{{pwd}}/bin/gce_pp.sh"
}
]
}