[VOL-5100] - periodic-voltha-test-bbsim
vars/getVolthaImageFlags.groovy
-------------------------------
o npm-groovy-lint cleanups, change double to single quotes.
o Changed return type from def to String so groovy string joins
cannot incorrectly cast types while joining strings with plus.
o [DEBUG] hudson.remoting.ProxyException: groovy.lang.MissingMethodException:
- No signature of method: java.lang.String.positive() is applicable for
- argument types: () values: []
Change-Id: I9e5a418cd1ab8efcaf52240787a00a415f3b882a
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 3943571..4df9a78 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -173,6 +173,8 @@
testSpecificHelmFlags
].join(' ')
+ println("** localHelmFlags = ${localHelmFlags}")
+
if (gerritProject != '') {
localHelmFlags = "${localHelmFlags} " + getVolthaImageFlags("${gerritProject}")
}
diff --git a/vars/getVolthaImageFlags.groovy b/vars/getVolthaImageFlags.groovy
index 7c8c4b8..c5ba815 100644
--- a/vars/getVolthaImageFlags.groovy
+++ b/vars/getVolthaImageFlags.groovy
@@ -16,39 +16,41 @@
// -----------------------------------------------------------------------
// returns the helm flags required to override a specific image
-def call(String project = "unknown", String tag = "citest", String pullPolicy = "Never") {
- def chart = "unknown"
- def image = "unknown"
+String call(String project = 'unknown', String tag = 'citest', String pullPolicy = 'Never') {
+ def chart = 'unknown'
+ def image = 'unknown'
switch(project) {
- case "ofagent-go":
- chart = "voltha"
- image = "ofagent"
+ case 'ofagent-go':
+ chart = 'voltha'
+ image = 'ofagent'
break
- case "voltha-go":
- chart = "voltha"
- image = "rw_core"
+ case 'voltha-go':
+ chart = 'voltha'
+ image = 'rw_core'
break
- case "voltha-openonu-adapter-go":
- chart = "voltha-adapter-openonu"
- image = "adapter_open_onu_go"
+ case 'voltha-openonu-adapter-go':
+ chart = 'voltha-adapter-openonu'
+ image = 'adapter_open_onu_go'
break
// TODO end
- case "voltha-openolt-adapter":
- chart = "voltha-adapter-openolt"
- image = "adapter_open_olt"
+ case 'voltha-openolt-adapter':
+ chart = 'voltha-adapter-openolt'
+ image = 'adapter_open_olt'
break
- case "bbsim":
+ case 'bbsim':
// BBSIM has a different format that voltha, return directly
- return "--set images.bbsim.tag=${tag},images.bbsim.pullPolicy=${pullPolicy},images.bbsim.registry='' "
+ 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}"
+ case 'voltha-onos':
+ return '--set onos-classic.image.repository=voltha/voltha-onos,onos-classic.image.tag=citest,onos-classic.image.pullPolicy=${pullPolicy}'
default:
- return ""
+ return ''
break
}
- return "--set ${chart}.images.${image}.tag=${tag},${chart}.images.${image}.pullPolicy=${pullPolicy},${chart}.images.${image}.registry='' "
+ String ans = "--set ${chart}.images.${image}.tag=${tag},${chart}.images.${image}.pullPolicy=${pullPolicy},${chart}.images.${image}.registry='' "
+ println("getVolthaImageFlags return ${ans}")
+ return(ans)
}
// [EOF]