Commit 175f2806 authored by Harald Sitter's avatar Harald Sitter 🌈
Browse files

move serving into contain as we need this on the host not the container

parent a520e67a
......@@ -33,6 +33,26 @@ dev_kvm = {
CgroupPermissions: 'mrw'
}
require 'webrick'
s = WEBrick::HTTPServer.new(DocumentRoot: '.', Port: 0, BindAddress: '0.0.0.0')
Thread.new do
shutdown = proc do
warn 'shutting down httpserver'
s.shutdown
end
siglist = %w[TERM QUIT]
siglist.concat(%w[HUP INT]) if STDIN.tty?
siglist &= Signal.list.keys
siglist.each do |sig|
Signal.trap(sig, shutdown)
end
warn 'starting server'
s.start
end
warn "Live data @ http://build.neon.kde.org:#{s.config.fetch(:Port)}.\n" \
'Disappears on exit.'
c = CI::Containment.new(JOB_NAME,
image: CI::PangeaImage.new(:ubuntu, DIST),
binds: ["#{Dir.pwd}:#{PWD_BIND}"],
......
......@@ -58,26 +58,6 @@ config = {
# Neon builders don't do KVM, disable it if the module is not loaded.
config[:QEMU_NO_KVM] = true unless system('lsmod | grep -q kvm_intel')
require 'webrick'
s = WEBrick::HTTPServer.new(DocumentRoot: '.', Port: 0)
Thread.new do
shutdown = proc do
warn 'shutting down httpserver'
s.shutdown
end
siglist = %w[TERM QUIT]
siglist.concat(%w[HUP INT]) if STDIN.tty?
siglist &= Signal.list.keys
siglist.each do |sig|
Signal.trap(sig, shutdown)
end
warn 'starting server'
s.start
end
warn "Live data @ http://build.neon.kde.org:#{s.config.fetch(:Port)}.\n" \
'Disappears on exit.'
File.write('vars.json', JSON.generate(config))
File.write('live_log', '')
system({ 'QEMU_AUDIO_DRV' => 'none' },
......
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