4

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:

  1. Ubuntu 14.04
  2. Ubuntu 16.04
  3. Debian 8
  4. Debian 9

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

  1. docker pull ubuntu:trusty
  2. docker run ubuntu:trusty
  3. Run make test inside the container (on my repo's clone)
  4. Copy the result.xml back to Travis
  5. 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!

1 Answer 1

1

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.

1
  • 1
    Travis supports only trusty from Linux and osx but I require trusty, xenail, jessie and stretch. These can only be done using docker I guess. Commented Aug 6, 2018 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.