ci: Enable automatic dependency installation in Jenkins scripts

This commit also unifies TravisCI dependency installation using Jenkins
scripts.

Change-Id: Ia7bae2e2f31e781c07acea729d61fa07345760ab
Refs: #2843
diff --git a/.travis.yml b/.travis.yml
index a4e4b2c..6156def 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,4 @@
-# For Ubuntu only
+sudo: true
 language: cpp
 os:
   - linux
@@ -8,8 +8,8 @@
   email:
     on_success: always
     on_failure: always
-before_install:
-  - travis_retry sudo apt-get update
-  - travis_retry sudo apt-get install -qq libssl-dev libpcap-dev libboost1.48-all-dev libcrypto++-dev libsqlite3-dev
 script:
+  - [[ $TRAVIS_OS_NAME == linux ]] && export NODE_LABELS="Linux Ubuntu Ubuntu-12.04"
+  - [[ $TRAVIS_OS_NAME == osx ]] && export NODE_LABELS="OSX OSX-10.10"
+  - echo $NODE_LABELS
   - ./.jenkins