-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathnestedView.groovy
36 lines (36 loc) · 966 Bytes
/
nestedView.groovy
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
import groovy.json.JsonSlurper
def slurper = new JsonSlurper()
def jsonText= readFileFromWorkspace("cd/config.json")
products = slurper.parseText(jsonText)
products.each { product ->
//println "product.name:"+product.name
nestedView(product.name) {
views {
product.stages.each{stage ->
views{
println "stage:"+stage
listView(stage) {
jobs {
//println "${product.name}__.*-to-${stage}__.*"
regex(/${product.name}__.*-to-${stage}_*.*/)
}
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
}
}
}
}
buildMonitorView('BM_'+product.name) {
description('All jobs for product '+product.name)
jobs {
name('release-projectA')
regex(/${product.name}__.+/)
}
}
}
}
}