[VOL-3878] Using the patch under test when running sanity on voltha-helm-charts
Change-Id: Ie8120a2b03d78611935ebabdcd97eda0d82a24e1
diff --git a/vars/volthaInfraDeploy.groovy b/vars/volthaInfraDeploy.groovy
index ecea1ad..37f5846 100644
--- a/vars/volthaInfraDeploy.groovy
+++ b/vars/volthaInfraDeploy.groovy
@@ -19,6 +19,7 @@
infraNamespace: "infra",
workflow: "att",
extraHelmFlags: "",
+ localCharts: false,
]
if (!config) {
@@ -27,6 +28,18 @@
def cfg = defaultConfig + config
+ def volthaInfraChart = "onf/voltha-infra"
+
+ if (cfg.localCharts) {
+ volthaInfraChart = "$WORKSPACE/voltha-helm-charts/voltha-infra"
+
+ sh """
+ pushd $WORKSPACE/voltha-helm-charts/voltha-infra
+ helm dep update
+ popd
+ """
+ }
+
println "Deploying VOLTHA Infra with the following parameters: ${cfg}."
sh """
@@ -35,7 +48,7 @@
"""
// TODO support multiple replicas
sh """
- helm upgrade --install --create-namespace -n ${cfg.infraNamespace} voltha-infra onf/voltha-infra ${cfg.extraHelmFlags} \
+ helm upgrade --install --create-namespace -n ${cfg.infraNamespace} voltha-infra ${volthaInfraChart} ${cfg.extraHelmFlags} \
-f $WORKSPACE/voltha-helm-charts/examples/${cfg.workflow}-values.yaml
"""
}