blob: 334cefd697cd601acff9a188bb34d8ec64856723 [file] [log] [blame]
Matteo Scandolo660e4af2021-04-02 11:16:09 -07001// returns the helm flags required to override a specific image
2def call(String project = "unknown", String tag = "citest", String pullPolicy = "Never") {
3 def chart = "unknown"
4 def image = "unknown"
5 switch(project) {
6 case "ofagent-go":
7 chart = "voltha"
8 image = "ofagent"
9 break
10 case "voltha-go":
11 chart = "voltha"
12 image = "rw_core"
13 break
14 case "voltha-openonu-adapter-go":
15 chart = "voltha-adapter-openonu"
16 image = "adapter_open_onu_go"
17 break
18 // TODO remove after 2.7
19 case "voltha-openonu-adapter":
20 chart = "voltha-adapter-openonu"
21 image = "adapter_open_onu"
22 break
23 // TODO end
24 case "voltha-openolt-adapter":
25 chart = "voltha-adapter-openolt"
26 image = "adapter_open_olt"
27 break
28 case "bbsim":
29 // BBSIM has a different format that voltha, return directly
30 return "--set images.bbsim.tag=${tag},images.bbsim.pullPolicy=${pullPolicy}"
31 break
32 default:
33 break
34 }
35
36 return "--set ${chart}.images.${image}.tag=${tag},${chart}.images.${image}.pullPolicy=${pullPolicy} "
37}