/
build-windows-2016-vs-2017.json
149 lines (149 loc) · 3.93 KB
/
build-windows-2016-vs-2017.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"variables": {
"aws_region": "",
"googlecompute_zone": "",
"googlecompute_project": "",
"image_family": "build-windows-2016-vs-2017",
"image_name_prefix": "{{user `image_family`}}"
},
"builders": [
{
"type": "amazon-ebs",
"instance_type": "c5d.2xlarge",
"ami_virtualization_type": "hvm",
"ami_name": "{{user `image_family`}}-{{timestamp}}",
"region": "{{user `aws_region`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "Windows_Server-2016-English-Full-Base-*",
"root-device-type": "ebs"
},
"owners": [
"amazon"
],
"most_recent": true
},
"subnet_id": "{{user `subnet_id`}}",
"vpc_id": "{{user `vpc_id`}}",
"tags": {
"owner": "{{user `owner`}}",
"repository": "{{user `repository`}}",
"branch": "{{user `branch`}}"
},
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"delete_on_termination": true,
"volume_size": 100
}
],
"user_data_file": "windows/2016/aws/startup.ps1",
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_insecure": true,
"winrm_use_ssl": true
},
{
"type": "googlecompute",
"machine_type": "n1-standard-2",
"project_id": "{{user `googlecompute_project`}}",
"zone": "{{user `googlecompute_zone`}}",
"source_image_family": "windows-2016",
"image_name": "{{user `image_name_prefix`}}-{{timestamp}}",
"image_family": "{{user `image_family`}}",
"image_labels": {
"owner": "{{user `owner`}}",
"repository": "{{user `repository`}}",
"branch": "{{user `branch`}}"
},
"disk_size": "100",
"metadata": {
"windows-startup-script-cmd": "dism /Online /NoRestart /Enable-Feature /All /FeatureName:NetFx3 & winrm quickconfig -quiet & winrm set winrm/config/service/auth @{Basic=\"true\"} & net user Administrator /active:yes"
},
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_insecure": true,
"winrm_use_ssl": true
}
],
"provisioners": [
{
"type": "powershell",
"scripts": [
"windows/disable-uac.ps1",
"windows/install-chocolatey.ps1"
]
},
{
"type": "powershell",
"scripts": [
"windows/install-vs-2017-community.ps1"
]
},
{
"type": "powershell",
"inline": [
"choco install openssh -params '/SSHServerFeature' -confirm",
"choco install git.install -confirm",
"choco install cmake.portable -confirm",
"# TODO Old CLI tests aren't compatible with Java 11",
"choco install liberica8jdk -confirm",
"choco install doxygen.install -confirm",
"choco install openssl -confirm",
"choco install strawberryperl -confirm",
"choco install nuget.commandline -confirm"
]
},
{
"type": "file",
"source": "windows/aws/init-ssh.ps1",
"destination": "$Env:ProgramData/ssh/init-ssh.ps1",
"only": [
"amazon-ebs"
]
},
{
"type": "file",
"source": "windows/google/init-ssh.ps1",
"destination": "$Env:ProgramData/ssh/init-ssh.ps1",
"only": [
"googlecompute"
]
},
{
"type": "powershell",
"inline": [
". $Env:ProgramData\\ssh\\init-ssh.ps1 -schedule"
]
},
{
"type": "powershell",
"scripts": [
"windows/aws/setup-ec2launch.ps1"
],
"only": [
"amazon-ebs"
]
},
{
"type": "windows-restart",
"restart_timeout": "30m"
},
{
"type": "powershell",
"scripts": [
"windows/cleanup.ps1"
]
},
{
"type": "powershell",
"inline": [
"GCESysprep -NoShutdown"
],
"only": [
"googlecompute"
]
}
]
}