Multi platform test on Travis-CI using Docker I am trying to write my .travis.yml to perform multi platform test on Travis-CI using Docker. The platforms I want to test on:


Ubuntu 14.04
Ubuntu 16.04
Debian 8
Debian 9


The whole concept in a nutshell is (for all 4 distros):


docker pull ubuntu:trusty
docker run ubuntu:trusty
Run make test inside the container (on my repo's clone)
Copy the result.xml back to Travis
Run scp result.xml ${SERVER_USER}@${SERVER_ADDR}:/home/${SERVER_USER}/result/


I know how to run scripts inside a docker container but how am I going to get the current branch inside the container and run make test on it make me go crazy.

Any help will be much appreciated!
This functionality is built straight into travis. Have a look at here. 

Secondly you should not need to specify a branch as part of your make script as travis will triggered on a specific branch and therefore that revision would already be checked out.