Avoid failure in case no port-forwards are present.
Without || true the result will be
ps aux
grep port-forw
grep -v grep
awk '{print $2}'
xargs --no-run-if-empty kill -9
kill: (15338): No such process
and the pipeline will forcefully stop.
Change-Id: I0b377e406567dc2dc154eed21216aa5b3f1ca8b1
diff --git a/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy b/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
index 42c4b29..5d5085a 100644
--- a/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
@@ -36,7 +36,7 @@
timeout(1) {
sh returnStdout: false, script: '''
# remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9 || true
'''
}
}