Clean up travis build.

 - Use groovy language.
 - Only publish master.
 - Use env variables directly.