travis-ci / worker

Worker runs your Travis CI jobs
MIT License
278 stars 86 forks source link

Add an option to define security.privileged #632

Closed rpsene closed 4 years ago

rpsene commented 4 years ago

Signed-off-by: Rafael Peria de Sene rpsene@br.ibm.com

What is the problem that this PR is trying to fix?

Allow setting security.privileged when running a LXD container via worker.env by setting export TRAVIS_WORKER_LXD_SECURITY_PRIVILEGED="true", false is the default.

When running, it will set it properly:

config:
  image.description: Travis CI Ubuntu 18.04 Full build env template!
  limits.cpu.allowance: 300%
  limits.memory: 6GB
  limits.processes: "5000"
  linux.kernel_modules: overlay
  security.devlxd: "false"
  security.idmap.isolated: "true"
  security.idmap.size: "100000"
  security.nesting: "true"
  security.privileged: "true"

What approach did you choose and why?

Add a new variable that makes it option, default is false.

How can you test this?

Set it to true and when doing a Travis build running in a LXD, get the configuration of the running container. This preference should be there.

What feedback would you like, if any?

A review is OK :o)

rpsene commented 4 years ago

@DamianSzymanski @pavel-d could you take a look?

pavel-d commented 4 years ago

@rpsene, built and released