[VOL-3780] Correctly overriding voltha-onos image
Change-Id: I8e6ecd4a0c38fb36f7f518e59765567ac7e49cce
diff --git a/vars/getVolthaImageFlags.groovy b/vars/getVolthaImageFlags.groovy
index 76dda9d..8770ff2 100644
--- a/vars/getVolthaImageFlags.groovy
+++ b/vars/getVolthaImageFlags.groovy
@@ -29,6 +29,8 @@
// BBSIM has a different format that voltha, return directly
return "--set images.bbsim.tag=${tag},images.bbsim.pullPolicy=${pullPolicy},images.bbsim.registry='' "
break
+ case "voltha-onos":
+ return "--set onos-classic.image.repository=voltha/voltha-onos,onos-classic.image.tag=citest,onos-classic.image.pullPolicy=${pullPolicy}"
default:
return ""
break
diff --git a/vars/volthaDeploy.groovy b/vars/volthaDeploy.groovy
index 17f9e5d..07146ee 100644
--- a/vars/volthaDeploy.groovy
+++ b/vars/volthaDeploy.groovy
@@ -27,13 +27,16 @@
def cfg = defaultConfig + config
if (cfg.dockerRegistry != "") {
- cfg.extraHelmFlags += " --set global.image_registry=${cfg.dockerRegistry}/ "
- cfg.extraHelmFlags += " --set etcd.image.registry=${cfg.dockerRegistry} "
- cfg.extraHelmFlags += " --set kafka.image.registry=${cfg.dockerRegistry} "
- cfg.extraHelmFlags += " --set kafka.zookeper.image.registry=${cfg.dockerRegistry} "
- cfg.extraHelmFlags += " --set onos-classic.image.repository=${cfg.dockerRegistry}/voltha/voltha-onos "
- cfg.extraHelmFlags += " --set onos-classic.atomix.image.repository=${cfg.dockerRegistry}/atomix/atomix "
- cfg.extraHelmFlags += " --set freeradius.images.radius.registry=${cfg.dockerRegistry}/ "
+ def registryFlags = " --set global.image_registry=${cfg.dockerRegistry}/ "
+ registryFlags += " --set etcd.image.registry=${cfg.dockerRegistry} "
+ registryFlags += " --set kafka.image.registry=${cfg.dockerRegistry} "
+ registryFlags += " --set kafka.zookeper.image.registry=${cfg.dockerRegistry} "
+ registryFlags += " --set onos-classic.image.repository=${cfg.dockerRegistry}/voltha/voltha-onos "
+ registryFlags += " --set onos-classic.atomix.image.repository=${cfg.dockerRegistry}/atomix/atomix "
+ registryFlags += " --set freeradius.images.radius.registry=${cfg.dockerRegistry}/ "
+
+ // we want to alway leave the user provided flags at the end, to override changes
+ cfg.extraHelmFlags = registryFlags + " " + cfg.extraHelmFlags
}
println "Deploying VOLTHA with the following parameters: ${cfg}."