forked from GoogleCloudPlatform/compute-image-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux_images.test.gotmpl
77 lines (77 loc) · 2.32 KB
/
linux_images.test.gotmpl
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
{
"Name": "linux-image-test",
"TestParallelCount": 10,
"Tests": {
{{$images := split .images "," -}}
{{$alias_ips := split .alias_ips "," -}}
{{$length := len $images -}}
{{range $index, $image := $images -}}
{{$alias_ip := randItem $alias_ips -}}
{{$machine_types := mkSlice "f1-micro" "g1-small" "n1-standard-4" "n1-standard-96" -}}
{{range $machine_type := $machine_types -}}
"test-boot-{{$machine_type}} [{{$image}}]": {
"Path": "./boot/boot.wf.json",
"Vars": {
"source_image": "{{$image}}",
"machine_type": "{{$machine_type}}",
"min_cpu_platform": "skylake"
}
},
{{end -}}
"test-metadata-ssh [{{$image}}]": {
"Path": "./metadata-ssh/metadata-ssh.wf.json",
"Vars": {
"source_image": "{{$image}}"
},
"ProjectLock": true
},
"test-oslogin-ssh [{{$image}}]": {
"Path": "./oslogin-ssh/oslogin-ssh.wf.json",
"Vars": {
"source_image": "{{$image}}"
},
"ProjectLock": true
},
"test-configuration [{{$image}}]": {
"Path": "./configuration/linux-configuration.wf.json",
"Vars": {
"source_image": "{{$image}}"
}
},
"test-startup-scripts [{{$image}}]": {
"Path": "./metadata-script/startup-script-linux.wf.json",
"Vars": {
"source_image": "{{$image}}"
}
},
"test-shutdown-scripts [{{$image}}]": {
"Path": "./metadata-script/shutdown-script-linux.wf.json",
"Vars": {
"source_image": "{{$image}}"
}
},
"test-multi-nic [{{$image}}]": {
"Path": "./multi-nic/multi-nic.wf.json",
"Vars": {
"source_image": "{{$image}}"
},
"CustomProjectLock": "subnetworks"
},
"test-network [{{$image}}]": {
"Path": "./network/network.wf.json",
"Vars": {
"source_image": "{{$image}}",
"alias_ip": "{{$alias_ip}}"
},
"CustomProjectLock": "alias-ip-{{$alias_ip}}"
},
"test-disk [{{$image}}]": {
"Path": "./disk/disk.wf.json",
"Vars": {
"source_image": "{{$image}}"
},
"CustomProjectLock": "disks"
}{{if lt (add $index 1) $length}},{{end}}
{{end -}}
}
}