forked from gusztavvargadr/packer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cake
392 lines (359 loc) · 9.08 KB
/
build.cake
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
#load "src/core/cake/core.cake"
var target = Argument("target", "default");
var configuration = Argument("configuration", string.Empty);
var recursive = Argument("recursive", false);
var version = "2205";
var buildDirectory = Argument("build-directory", "./build");
PackerTemplate.BuildDirectory = buildDirectory;
var ws2022s = PackerTemplates_CreateWindows(
"ws2022s",
"windows-server-2022-standard",
$"2102.0.{version}",
aliases: new [] { "windows-server" }
);
var ws2019s = PackerTemplates_CreateWindows(
"ws2019s",
"windows-server-2019-standard",
$"1809.0.{version}",
aliases: new [] { "windows-server" }
);
var ws2016s = PackerTemplates_CreateWindows(
"ws2016s",
"windows-server-2016-standard",
$"1607.0.{version}",
aliases: new [] { "windows-server" }
);
var wsips = PackerTemplates_CreateWindows(
"wsips",
"windows-server-insider-preview-standard",
$"2102.0.{version}"
);
var ws2022sc = PackerTemplates_CreateWindows(
"ws2022sc",
"windows-server-2022-standard-core",
$"2102.0.{version}",
aliases: new [] { "windows-server-core" }
);
var ws2019sc = PackerTemplates_CreateWindows(
"ws2019sc",
"windows-server-2019-standard-core",
$"1809.0.{version}",
aliases: new [] { "windows-server-core" }
);
var ws2016sc = PackerTemplates_CreateWindows(
"ws2016sc",
"windows-server-2016-standard-core",
$"1607.0.{version}",
aliases: new [] { "windows-server-core" }
);
var wsipsc = PackerTemplates_CreateWindows(
"wsipsc",
"windows-server-insider-preview-standard-core",
$"2102.0.{version}"
);
var w1121h2e = PackerTemplates_CreateWindows(
"w1121h2e",
"windows-11-21h2-enterprise",
$"2102.0.{version}",
aliases: new [] { "windows-11" }
);
var w11ipe = PackerTemplates_CreateWindows(
"w11ipe",
"windows-11-insider-preview-enterprise",
$"2102.0.{version}"
);
var w1021h2e = PackerTemplates_CreateWindows(
"w1021h2e",
"windows-10-21h2-enterprise",
$"2102.0.{version}",
aliases: new [] { "windows-10" }
);
var w1021h1e = PackerTemplates_CreateWindows(
"w1021h1e",
"windows-10-21h1-enterprise",
$"2101.0.{version}",
aliases: new [] { "windows-10" }
);
var w1021h2eltsc = PackerTemplates_CreateWindows(
"w1021h2eltsc",
"windows-10-21h2-enterprise-ltsc",
$"2102.0.{version}"
);
var w101809eltsc = PackerTemplates_CreateWindows(
"w101809eltsc",
"windows-10-1809-enterprise-ltsc",
$"1809.0.{version}"
);
var w10ipe = PackerTemplates_CreateWindows(
"w10ipe",
"windows-10-insider-preview-enterprise",
$"2102.0.{version}"
);
var u2004s = PackerTemplates_CreateLinux(
"u2004s",
"ubuntu-server-2004-lts",
$"2004.0.{version}",
aliases: new [] { "ubuntu-server" }
);
var u1804s = PackerTemplates_CreateLinux(
"u1804s",
"ubuntu-server-1804-lts",
$"1804.0.{version}",
aliases: new [] { "ubuntu-server" }
);
var u1604s = PackerTemplates_CreateLinux(
"u1604s",
"ubuntu-server-1604-lts",
$"1604.0.{version}",
aliases: new [] { "ubuntu-server" }
);
var u2004d = PackerTemplates_CreateLinux(
"u2004d",
"ubuntu-desktop-2004-lts-xfce",
$"2004.0.{version}",
u2004s,
aliases: new [] { "ubuntu-desktop" }
);
var u1804d = PackerTemplates_CreateLinux(
"u1804d",
"ubuntu-desktop-1804-lts-xfce",
$"1804.0.{version}",
u1804s,
aliases: new [] { "ubuntu-desktop" }
);
var u1604d = PackerTemplates_CreateLinux(
"u1604d",
"ubuntu-desktop-1604-lts-xfce",
$"1604.0.{version}",
u1604s,
aliases: new [] { "ubuntu-desktop" }
);
var ws2022s_de = PackerTemplates_CreateWindows(
"ws2022s-de",
"docker-enterprise-windows-server",
$"2010.2102.{version}",
ws2022s,
aliases: new [] { "docker-windows" }
);
var ws2019s_de = PackerTemplates_CreateWindows(
"ws2019s-de",
"docker-enterprise-windows-server",
$"2010.1809.{version}",
ws2019s,
aliases: new [] { "docker-windows" }
);
var ws2022sc_de = PackerTemplates_CreateWindows(
"ws2022sc-de",
"docker-enterprise-windows-server-core",
$"2010.2102.{version}",
ws2022sc
);
var ws2019sc_de = PackerTemplates_CreateWindows(
"ws2019sc-de",
"docker-enterprise-windows-server-core",
$"2010.1809.{version}",
ws2019sc
);
var u2004s_dc = PackerTemplates_CreateLinux(
"u2004s-dc",
"docker-community-ubuntu-server",
$"2010.2004.{version}",
u2004s,
aliases: new [] { "docker-linux" }
);
var u1804s_dc = PackerTemplates_CreateLinux(
"u1804s-dc",
"docker-community-ubuntu-server",
$"2010.1804.{version}",
u1804s,
aliases: new [] { "docker-linux" }
);
var u1604s_dc = PackerTemplates_CreateLinux(
"u1604s-dc",
"docker-community-ubuntu-server",
$"2010.1604.{version}",
u1604s,
aliases: new [] { "docker-linux" }
);
var u2004d_dc = PackerTemplates_CreateLinux(
"u2004d-dc",
"docker-community-ubuntu-desktop",
$"2010.2004.{version}",
u2004d
);
var u1804d_dc = PackerTemplates_CreateLinux(
"u1804d-dc",
"docker-community-ubuntu-desktop",
$"2010.1804.{version}",
u1804d
);
var u1604d_dc = PackerTemplates_CreateLinux(
"u1604d-dc",
"docker-community-ubuntu-desktop",
$"2010.1604.{version}",
u1604d
);
var w1121h2e_dd = PackerTemplates_CreateWindows(
"w1121h2e-dd",
"docker-desktop-windows-11",
$"2010.2102.{version}",
w1121h2e
);
var w1021h2e_dd = PackerTemplates_CreateWindows(
"w1021h2e-dd",
"docker-desktop-windows-10",
$"2010.2102.{version}",
w1021h2e
);
var ws2022s_iis = PackerTemplates_CreateWindows(
"ws2022s-iis",
"iis-windows-server",
$"10.2102.{version}",
ws2022s,
aliases: new [] { "iis" }
);
var ws2019s_iis = PackerTemplates_CreateWindows(
"ws2019s-iis",
"iis-windows-server",
$"10.1809.{version}",
ws2019s,
aliases: new [] { "iis" }
);
var ws2022sc_iis = PackerTemplates_CreateWindows(
"ws2022sc-iis",
"iis-windows-server-core",
$"10.2102.{version}",
ws2022sc
);
var ws2019sc_iis = PackerTemplates_CreateWindows(
"ws2019sc-iis",
"iis-windows-server-core",
$"10.1809.{version}",
ws2019sc
);
var ws2022s_sql19d = PackerTemplates_CreateWindows(
"ws2022s-sql19d",
"sql-server-2019-developer-windows-server",
$"2019.2102.{version}",
ws2022s,
aliases: new [] { "sql-server" }
);
var ws2022s_sql17d = PackerTemplates_CreateWindows(
"ws2022s-sql17d",
"sql-server-2017-developer-windows-server",
$"2017.2102.{version}",
ws2022s,
aliases: new [] { "sql-server" }
);
var ws2022sc_sql19d = PackerTemplates_CreateWindows(
"ws2022sc-sql19d",
"sql-server-2019-developer-windows-server-core",
$"2019.2102.{version}",
ws2022sc
);
var ws2022sc_sql17d = PackerTemplates_CreateWindows(
"ws2022sc-sql17d",
"sql-server-2017-developer-windows-server-core",
$"2017.2102.{version}",
ws2022sc
);
var w1121h2e_dd_vs22c = PackerTemplates_CreateWindows(
"w1121h2e-dd-vs22c",
"visual-studio-2022-community-windows-11",
$"2022.2102.{version}",
w1121h2e_dd
);
var w1121h2e_dd_vs19c = PackerTemplates_CreateWindows(
"w1121h2e-dd-vs19c",
"visual-studio-2019-community-windows-11",
$"2019.2102.{version}",
w1121h2e_dd
);
var w1121h2e_dd_vs17c = PackerTemplates_CreateWindows(
"w1121h2e-dd-vs17c",
"visual-studio-2017-community-windows-11",
$"2017.2102.{version}",
w1121h2e_dd
);
var w1021h2e_dd_vs22c = PackerTemplates_CreateWindows(
"w1021h2e-dd-vs22c",
"visual-studio-2022-community-windows-10",
$"2022.2102.{version}",
w1021h2e_dd,
aliases: new [] { "visual-studio" }
);
var w1021h2e_dd_vs19c = PackerTemplates_CreateWindows(
"w1021h2e-dd-vs19c",
"visual-studio-2019-community-windows-10",
$"2019.2102.{version}",
w1021h2e_dd,
aliases: new [] { "visual-studio" }
);
var w1021h2e_dd_vs17c = PackerTemplates_CreateWindows(
"w1021h2e-dd-vs17c",
"visual-studio-2017-community-windows-10",
$"2017.2102.{version}",
w1021h2e_dd,
aliases: new [] { "visual-studio" }
);
var w1021h2e_dd_vs19p = PackerTemplates_CreateWindows(
"w1021h2e-dd-vs19p",
"visual-studio-2019-professional-windows-10",
$"2019.2102.{version}",
w1021h2e_dd
);
var w1021h2e_dd_vs17p = PackerTemplates_CreateWindows(
"w1021h2e-dd-vs17p",
"visual-studio-2017-professional-windows-10",
$"2017.2102.{version}",
w1021h2e_dd
);
Task("default")
.IsDependentOn("info");
Task("info")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Info);
});
Task("version")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Version);
});
Task("restore")
.IsDependentOn("version")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Restore);
});
Task("build")
.IsDependentOn("restore")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Build);
});
Task("rebuild")
.IsDependentOn("clean")
.IsDependentOn("build")
.Does(() => {
});
Task("test")
.IsDependentOn("build")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Test);
});
Task("package")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Package);
});
Task("publish")
.IsDependentOn("package")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Publish);
});
Task("download")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Download);
});
Task("clean")
.IsDependentOn("version")
.Does(() => {
PackerTemplates_ForEach(configuration, PackerTemplate_Clean);
});
RunTarget(target);