This repository was archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
/
Copy pathtemplate.json
101 lines (97 loc) · 3.53 KB
/
template.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
"variables": {
"url": "https://github.com/boot2docker/boot2docker/releases/download/v1.7.0/boot2docker.iso",
"checksum": "3ebc29aecabc990c4303b9cc6ab26fa8acc673bfbfae3f2fbd8d827c0ff48183",
"version": "1.7",
"number": "{{env `ATLAS_BUILD_NUMBER`}}"
},
"builders": [{
"type": "virtualbox-iso",
"iso_url": "{{user `url`}}",
"iso_checksum_type": "sha256",
"iso_checksum": "{{user `checksum`}}",
"boot_wait": "5s",
"guest_additions_mode": "attach",
"guest_os_type": "Linux_64",
"ssh_username": "docker",
"ssh_password": "tcuser",
"shutdown_command": "sudo poweroff"
}, {
"type": "vmware-iso",
"iso_url": "{{user `url`}}",
"iso_checksum_type": "sha256",
"iso_checksum": "{{user `checksum`}}",
"boot_wait": "5s",
"guest_os_type": "other3xlinux-64",
"ssh_username": "docker",
"ssh_password": "tcuser",
"shutdown_command": "sudo poweroff"
}, {
"type": "parallels-iso",
"iso_url": "{{user `url`}}",
"iso_checksum_type": "sha256",
"iso_checksum": "{{user `checksum`}}",
"boot_wait": "5s",
"guest_os_distribution": "linux",
"ssh_username": "docker",
"ssh_password": "tcuser",
"shutdown_command": "sudo poweroff"
}],
"provisioners": [{
"type": "shell-local",
"command": "chmod +x ./download.sh && ./download.sh '{{user `url`}}' {{user `checksum`}}"
}, {
"type": "shell",
"except": ["vmware-iso"],
"inline": [
"mkfs.ext4 -F -L boot2docker-data /dev/sda",
"sudo mkdir /mnt/sda",
"sudo mount /dev/sda /mnt/sda",
"sudo mkdir -p /mnt/sda/var/lib/boot2docker",
"sudo echo 'export DOCKER_TLS=no' > /tmp/profile",
"sudo mv /tmp/profile /mnt/sda/var/lib/boot2docker/profile",
"sudo chown root:root /mnt/sda/var/lib/boot2docker/profile",
"sync"
]
}, {
"type": "shell",
"only": ["vmware-iso"],
"inline": [
"sudo mkdir -p /mnt/sda1/var/lib/boot2docker",
"sudo echo 'export DOCKER_TLS=no' > /tmp/profile",
"sudo mv /tmp/profile /mnt/sda1/var/lib/boot2docker/profile",
"sudo chown root:root /mnt/sda1/var/lib/boot2docker/profile",
"sync"
]
}],
"post-processors": [[{
"type": "vagrant",
"include": ["boot2docker.iso"],
"vagrantfile_template": "vagrantfile.tpl",
"output": "boot2docker_{{.Provider}}.box"
},{
"type": "atlas",
"only": ["vmware-iso"],
"artifact": "hashicorp/boot2docker",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "vmware_desktop",
"version": "{{user `version`}}.{{user `number`}}",
"description": "boot2docker v{{user `version`}}. The last part of the version is just a build number we increment as we make patch changes to the Vagrant box."
}
},{
"type": "atlas",
"only": ["virtualbox-iso"],
"artifact": "hashicorp/boot2docker",
"artifact_type": "vagrant.box",
"metadata": {
"provider": "virtualbox",
"version": "{{user `version`}}.{{user `number`}}",
"description": "boot2docker v{{user `version`}}. The last part of the version is just a build number we increment as we make patch changes to the Vagrant box."
}
}]],
"push": {
"name": "hashicorp/boot2docker",
"vcs": true
}
}