Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you specify IP addresses for TravisCI's host addon?

Tags:

travis-ci

According to TravisCI docs,

If your build requires setting up custom hostnames, you can specify a single host or a list of them in your .travis.yml. Travis CI will automatically setup the hostnames in /etc/hosts for both IPv4 and IPv6.

But it doesn't say anything of specifying IP addresses. It also says nothing of the format for the host names. Is is possible to specify a simple alias, like myhostnamealias or does it require a FQDN? At least CircleCI mentions that it uses a FQDN (although I don't know why that stipulation exists, but that's a separate question.)

Thanks, Robin.

like image 536
Robin Coe Avatar asked Aug 04 '15 15:08

Robin Coe


1 Answers

By experiment I have figured out that the list of hosts provided in

addons:
  hosts:
    - travis.dev
    - joshkalderimis.com

are all being set up to point to 127.0.0.1 equivalent to /etc/hosts entries like this:

127.0.0.1 travis.dev
127.0.0.1 joshkalderimis.com
like image 170
Jarl Avatar answered Oct 19 '22 23:10

Jarl