mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[REM] runbot: remove non nginx support
Some non tested code was making running build available without an nginx config (using port and local address instead of using a proper dns/nginx config). Removing this part to reduce complexity.
This commit is contained in:
parent
02cbc0d090
commit
272096b810
@ -387,14 +387,8 @@ class BuildResult(models.Model):
|
||||
|
||||
@api.depends('port', 'dest', 'host')
|
||||
def _compute_domain(self):
|
||||
icp = self.env['ir.config_parameter'].sudo()
|
||||
nginx = icp.get_param('runbot.runbot_nginx', False) # or just force nginx?
|
||||
domain = icp.get_param('runbot.runbot_domain', fqdn())
|
||||
for build in self:
|
||||
if nginx:
|
||||
build.domain = "%s.%s" % (build.dest, build.host)
|
||||
else:
|
||||
build.domain = "%s:%s" % (domain, build.port)
|
||||
build.domain = "%s.%s" % (build.dest, build.host)
|
||||
|
||||
@api.depends_context('batch')
|
||||
def _compute_build_url(self):
|
||||
|
@ -345,15 +345,12 @@ class ConfigStep(models.Model):
|
||||
cmd += ['-d', '%s-%s' % (build.dest, db_name)]
|
||||
|
||||
icp = self.env['ir.config_parameter'].sudo()
|
||||
nginx = icp.get_param('runbot.runbot_nginx', True)
|
||||
if grep(build._server("tools/config.py"), "proxy-mode") and nginx:
|
||||
if grep(build._server("tools/config.py"), "proxy-mode"):
|
||||
cmd += ["--proxy-mode"]
|
||||
|
||||
if grep(build._server("tools/config.py"), "db-filter"):
|
||||
if nginx:
|
||||
cmd += ['--db-filter', '%d.*$']
|
||||
else:
|
||||
cmd += ['--db-filter', '%s.*$' % build.dest]
|
||||
cmd += ['--db-filter', '%d.*$']
|
||||
|
||||
smtp_host = docker_get_gateway_ip()
|
||||
if smtp_host:
|
||||
cmd += ['--smtp', smtp_host]
|
||||
|
@ -35,7 +35,6 @@ class ResConfigSettings(models.TransientModel):
|
||||
|
||||
# TODO other icp
|
||||
# runbot.runbot_maxlogs 100
|
||||
# runbot.runbot_nginx True
|
||||
# migration db
|
||||
# ln path
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user