[IMP] runbot: enable screencast, add access control, small fixes

This commit is contained in:
Xavier-Do 2020-09-23 13:22:50 +02:00 committed by XavierDo
parent 17f0458d06
commit b991eb5b70
6 changed files with 7 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -942,7 +942,7 @@ class BuildResult(models.Model):
if logdb_uri and grep(build._server('sql_db.py'), 'allow_uri'):
logdb = '%s' % logdb_uri
command.add_config_tuple("log_db", "%s" % logdb)
if grep(build._server('tools/config.py'), 'log-db-level'):
if grep(config_path, 'log-db-level'):
command.add_config_tuple("log_db_level", '25')
if grep(config_path, "data-dir"):

View File

@ -397,6 +397,9 @@ class ConfigStep(models.Model):
if grep(config_path, "--screenshots"):
cmd.add_config_tuple('screenshots', '/data/build/tests')
if grep(config_path, "--screencasts"):
cmd.add_config_tuple('screencasts', '/data/build/tests')
cmd.append('--stop-after-init') # install job should always finish
if '--log-level' not in extra_params:
cmd.append('--log-level=test')

View File

@ -34,7 +34,6 @@ class Runbot(models.AbstractModel):
return os.path.abspath(default)
def _scheduler(self, host):
self._gc_testing(host)
self._commit()
for build in self._get_builds_with_requested_actions(host):
@ -152,6 +151,7 @@ class Runbot(models.AbstractModel):
env = self.env
settings = {}
settings['port'] = config.get('http_port')
settings['runbot_domain'] = self._domain()
settings['runbot_static'] = os.path.join(get_module_resource('runbot', 'static'), '')
nginx_dir = os.path.join(self._root(), 'nginx')
settings['nginx_dir'] = nginx_dir

View File

@ -7,4 +7,4 @@ class User(models.Model):
# Add default action_id
action_id = fields.Many2one('ir.actions.actions',
default=lambda self: self.env.ref('runbot.runbot_menu_warning_root', raise_if_not_found=False))
default=lambda self: self.env.ref('runbot.open_view_warning_tree', raise_if_not_found=False))

View File

@ -47,6 +47,7 @@ server {
autoindex off;
location ~ /runbot/static/build/[^/]+/(logs|tests)/ {
autoindex on;
add_header 'Access-Control-Allow-Origin' 'https://<t t-esc="runbot_domain"/>';
}
}
}