Fix broken quote buried in script
jjb/pipeline/voltha/master/bbsim-tests.groovy
jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
--------------------------------------------------
o Triple quote surrounding banner text.
o Single quote (broken paste?) buried in the middle broke synatx
Change-Id: I112148ba76c79a59deb807c3faa45b752871c366
diff --git a/edit.sh b/edit.sh
new file mode 100755
index 0000000..fbea2d7
--- /dev/null
+++ b/edit.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+# args+=('--quick')
+emacs ./jjb/pipeline/voltha/{master,voltha-2.12}/bbsim-tests.groovy
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 3927ad3..4850e20 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -205,7 +205,7 @@
}
// -----------------------------------------------------------------------
- // stop logging
+ // stop logging
// -----------------------------------------------------------------------
sh """
P_IDS="\$(ps e -ww -A | grep "_TAG=kail-startup" | grep -v grep | awk '{print \$1}')"
@@ -519,18 +519,17 @@
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
- stage('voltctl [DEBUG]')
- {
- steps
- {
- println("${iam} Display umask")
- sh('umask')
-
- println("${iam} Checking voltctl config permissions")
- sh('/bin/ls -ld ~/.volt || true')
+ stage('voltctl [DEBUG]') {
+ steps {
+ script {
+ String iam = getIam('execute_test')
- println("${iam} Running find")
- sh('/bin/ls -l ~/.volt')
+ println("${iam} Display umask")
+ sh('umask')
+
+ println("${iam} Checking voltctl config permissions")
+ sh('/bin/ls -ld ~/.volt ~/.volt/* || true')
+ } // script
} // steps
} // stage
diff --git a/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy b/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
index 2fe0a16..ebeaa4d 100644
--- a/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
@@ -69,6 +69,7 @@
}
// -----------------------------------------------------------------------
+// Intent:
// -----------------------------------------------------------------------
void pgrep_proc(String proc)
{
@@ -111,9 +112,9 @@
// -----------------------------------------------------------------------
stage('Cleanup')
{
- if (teardown) {
+ if (teardown) {
timeout(15) {
- script {
+ script {
helmTeardown(['default', infraNamespace, volthaNamespace])
}
} // timeout
@@ -135,10 +136,10 @@
pgrep --list-full "${proc}" || true ; }
""")
println("${iam}: LEAVE")
- } // script
+ } // script
} // timeout
} // teardown
- } // stage
+ } // stage('Cleanup')
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
@@ -159,19 +160,19 @@
'prometheus.pushgateway.enabled=false',
].join(',')
- sh('''
+ sh("""
helm repo add onf https://charts.opencord.org
helm repo update
echo -e "\nwithMonitoring=[$withMonitoring]"
if [ ${withMonitoring} = true ] ; then
helm install nem-monitoring onf/nem-monitoring \
- --set $promargs \
- --set $dashargs
+ --set ${promargs} \
+ --set ${dashargs}
fi
- ''')
- }
- }
+ """)
+ } // script
+ } // stage('Deploy Common Infra')
// -----------------------------------------------------------------------
// [TODO] Check onos_log output
@@ -186,17 +187,16 @@
script
{
String iam = getIam('Deploy Voltha')
- String combinedLog = "${logsDir}/onos-voltha-startup-combined.log"
+ String onosLog = "${logsDir}/onos-voltha-startup-combined.log"
sh("""
mkdir -p ${logsDir}
- onos_log="${logsDir}/onos-voltha-startup-combined.log"
- touch "$onos_log
- echo "** kail-startup ENTER: \$(date)" > "$onos_log"
+ touch "$onosLog"
+ echo "** kail-startup ENTER: \$(date)" > "$onosLog"
# Intermixed output (tee -a &) may get conflusing but let(s) see
# what messages are logged during startup.
- # _TAG=kail-startup kail -n ${infraNamespace} -n ${volthaNamespace} >> "$onos_log" &
- _TAG=kail-startup kail -n ${infraNamespace} -n ${volthaNamespace} | tee -a "$onos_log" &
+ # _TAG=kail-startup kail -n ${infraNamespace} -n ${volthaNamespace} >> "$onosLog" &
+ _TAG=kail-startup kail -n ${infraNamespace} -n ${volthaNamespace} | tee -a "$onosLog" &
""")
// if we're downloading a voltha-helm-charts patch, then install from a local copy of the charts
@@ -210,12 +210,12 @@
}
String branchName = branchName()
- Boolean is_release = isReleaseBranch(branch)
+ Boolean isRelease = isReleaseBranch(branch)
println([
" ** localCharts=${localCharts}",
"branchName=${branchName}",
"branch=${branch}",
- "branch=isReleaseBranch=${is_release}",
+ "branch=isReleaseBranch=${isRelease}",
].join(', '))
// -----------------------------------------------------------------------
@@ -243,7 +243,7 @@
localHelmFlags = "${localHelmFlags} " + getVolthaImageFlags("${gerritProject}")
}
- println('** ${iam}: ENTER')
+ println("** ${iam}: ENTER")
volthaDeploy([
infraNamespace: infraNamespace,
volthaNamespace: volthaNamespace,
@@ -254,7 +254,7 @@
bbsimReplica: olts.toInteger(),
dockerRegistry: registry,
])
- println('** ${iam}: LEAVE')
+ println("** ${iam}: LEAVE")
} // script
// -----------------------------------------------------------------------
@@ -303,7 +303,7 @@
rm onos-voltha-startup-combined.log
popd
""")
- } // timeout(10)
+ } // timeout(10)
// -----------------------------------------------------------------------
@@ -411,6 +411,7 @@
echo '** Installing python virtualenv'
make venv-activate-patched
+
set +u && source .venv/bin/activate && set -u
# Collect memory consumption of voltha pods once all the tests are complete
python scripts/mem_consumption.py -o $WORKSPACE/voltha-pods-mem-consumption-${workflow} -a 0.0.0.0:31301 -n ${volthaNamespace}
@@ -648,7 +649,7 @@
tests.eachWithIndex { test, idx ->
String target = test['target']
println("** $idx: $target")
- }
+ }
println("** NOTE: For odd failures compare tests-to-run with teste output")
tests.eachWithIndex { test, idx ->
@@ -663,9 +664,9 @@
print("""
** -----------------------------------------------------------------------
-** Executing test ${target} on workflow ${workflow} with logging ${testLogging} and extra flags ${flags}"
+** Executing test ${target} on workflow ${workflow} with logging ${testLogging} and extra flags ${flags}
** -----------------------------------------------------------------------
-)
+""")
try {
println "Executing test ${target}: ENTER"