ci: Updating Jenkins-CI and Travis-CI scripts

This commit makes use of has function from `util.sh` script, enables
dependency installation for Jenkins-CI, and unifies dependency
installation between Jenkins-CI and Travis-CI.

Change-Id: I5f4419ea48d4eb333e9d107115ef3df4123f76e5
Refs: #2805
diff --git a/.jenkins.d/30-coverage.sh b/.jenkins.d/30-coverage.sh
index ccbb62e..6a7b0a8 100755
--- a/.jenkins.d/30-coverage.sh
+++ b/.jenkins.d/30-coverage.sh
@@ -2,9 +2,10 @@
 set -x
 set -e
 
-IS_COVR=$( python -c "print 'yes' if 'code-coverage' in '$JOB_NAME' else 'no'" )
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
 
-if [[ $IS_COVR == "yes" ]]; then
+if has code-coverage $JOB_NAME; then
   BASE="`pwd | sed -e 's|/|\\\/|g'`\\"
   (cd build && gcovr -x -f $BASE/src -r ../ -o coverage.xml -b ./)
 fi