added build steps of deploy as per .travis.yml definition and refactor code
added build steps of deploy as per .travis.yml definition and refactor code


kanekotic/travis-yml-plugin,masaki/jenkins-travis-yml-plugin