blob: 5d6663cc1fb0bbf39d83f238283349b6fd12bca5 (
plain)
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
|
def expanded = [:]
def excluded = []
my_str = readFile(file: "base-images/base-image-axes.yaml")
yaml = new org.yaml.snakeyaml.Yaml()
axis_config = yaml.load(my_str)
yaml = null
/* Sadly we can't use the map.each {} iterator in pipeline scripts yet ... */
exclusions = axis_config["exclude-from-all"]
for (int i = 0; exclusions && i < exclusions.size(); i++) {
exclusion = exclusions[i]["exclusion"]
platform = exclusion["platform"]
arch = exclusion["arch"]
excluded << "${platform}-${arch}"
println "excluding ${platform}-${arch}"
}
platform_list = axis_config["platform"]
arch_list = axis_config["arch"]
for (int i = 0; i < platform_list.size(); i++) {
def platform = platform_list[i]
for (int j = 0; j < arch_list.size(); j++) {
def arch = arch_list[j]
def name = "${platform}-${arch}"
if (excluded.contains(name)) {
continue;
}
expanded[name] = {
build(job: "docker-images/wayland-images/${name}", parameters: [string(name: 'STAMP', value: STAMP)], propagate: true, wait: true)
}
}
}
parallel expanded
|