Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use sudo: true with single element of build matrix in travis.ci?

Tags:

travis-ci

I use and love the Travis CI continuous integration for an open source project on GitHub. I like the fast container builds, so I set sudo: false globally on my script.

However, in one particular build of my build matrix I want to spin up my own a docker container, so I think I need sudo: true here. Does this mean that I need to use sudo: true for all of my builds or is there some way around this? I would like to set sudo: true for just one build. Alternatively, is it possible to have multiple .travis.yml scripts in the same GitHub repository?

like image 429
MRocklin Avatar asked Oct 18 '22 18:10

MRocklin


1 Answers

As shown in the numpy .travis.yml script you can specify sudo: true on a per-element basis.

  include:
    - python: 2.7
      sudo: true
      dist: trusty
      env: ...
    - python: 2.7
      env: ...
like image 140
MRocklin Avatar answered Jan 04 '23 05:01

MRocklin