forked from offen/digitalocean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarketplace-image.json
53 lines (53 loc) · 1.3 KB
/
marketplace-image.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
42
43
44
45
46
47
48
49
50
51
52
53
{
"variables": {
"token": "{{env `DOTOKEN`}}",
"build": "{{env `CIRCLE_BUILD_NUM`}}",
"image_name": "offen",
"offen_version": "v1.2.1"
},
"builders": [
{
"type": "digitalocean",
"api_token": "{{user `token`}}",
"image": "ubuntu-20-04-x64",
"region": "fra1",
"size": "s-1vcpu-1gb",
"ssh_username": "root",
"snapshot_name": "{{user `image_name`}}-{{user `offen_version`}}-{{user `build`}}"
}
],
"provisioners": [
{
"type": "file",
"source": "files/etc/",
"destination": "/etc/"
},
{
"type": "file",
"source": "files/opt/",
"destination": "/opt/"
},
{
"type": "shell",
"inline": [
"cloud-init status --wait",
"DEBIAN_FRONTEND=noninteractive apt -qqy update",
"DEBIAN_FRONTEND=noninteractive apt -qqy -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' full-upgrade"
]
},
{
"type": "shell",
"environment_vars": [
"OFFEN_VERSION={{user `offen_version`}}"
],
"scripts": [
"scripts/10-install",
"scripts/20-configure_service",
"scripts/30-configure_firewall",
"scripts/40-add_firstrun",
"scripts/90-cleanup",
"scripts/99-img_check"
]
}
]
}