Commit 6d0a9a97 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

this api :@

parent 360d39dc
......@@ -27,9 +27,16 @@ DIST = ENV.fetch('DIST')
JOB_NAME = ENV.fetch('JOB_NAME')
PWD_BIND = ENV.fetch('PWD_BIND', '/workspace')
dev_kvm = {
PathOnHost: '/dev/kvm',
PathInContainer: '/dev/kvm',
CgroupPermissions: 'mrw'
}
c = CI::Containment.new(JOB_NAME,
image: CI::PangeaImage.new(:ubuntu, DIST),
binds: ["#{Dir.pwd}:#{PWD_BIND}"],
privileged: false)
status_code = c.run(Cmd: ARGV, WorkingDir: PWD_BIND, Devices: %w(/dev/kvm))
status_code = c.run(Cmd: ARGV, WorkingDir: PWD_BIND,
HostConfig: { Devices: [dev_kvm] })
exit status_code
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment