mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[IMP] runbot: add extra parameters and environment variables to run stages
This commit is contained in:
parent
7e2d7c65a1
commit
237e931e57
@ -338,12 +338,17 @@ class ConfigStep(models.Model):
|
||||
if smtp_host:
|
||||
cmd += ['--smtp', smtp_host]
|
||||
|
||||
extra_params = self.extra_params or ''
|
||||
if extra_params:
|
||||
cmd.extend(shlex.split(extra_params))
|
||||
env_variables = self.additionnal_env.split(';') if self.additionnal_env else []
|
||||
|
||||
docker_name = build._get_docker_name()
|
||||
build_path = build._path()
|
||||
build_port = build.port
|
||||
self.env.cr.commit() # commit before docker run to be 100% sure that db state is consistent with dockers
|
||||
self.invalidate_cache()
|
||||
res = docker_run(cmd, log_path, build_path, docker_name, exposed_ports=[build_port, build_port + 1], ro_volumes=exports)
|
||||
res = docker_run(cmd, log_path, build_path, docker_name, exposed_ports=[build_port, build_port + 1], ro_volumes=exports, env_variables=env_variables)
|
||||
self.env['runbot.runbot']._reload_nginx()
|
||||
return res
|
||||
|
||||
|
@ -72,9 +72,9 @@
|
||||
<field name="test_tags"/>
|
||||
<field name="enable_auto_tags"/>
|
||||
<field name="sub_command"/>
|
||||
<field name="extra_params" groups="base.group_no_one"/>
|
||||
</group>
|
||||
<group string="Test settings" attrs="{'invisible': [('job_type', 'not in', ('python', 'install_odoo', 'test_upgrade'))]}">
|
||||
<group string="Extra Parameters" attrs="{'invisible': [('job_type', 'not in', ('python', 'install_odoo', 'test_upgrade', 'run_odoo'))]}">
|
||||
<field name="extra_params"/>
|
||||
<field name="additionnal_env"/>
|
||||
</group>
|
||||
<group string="Create settings" attrs="{'invisible': [('job_type', 'not in', ('python', 'create_build'))]}">
|
||||
|
Loading…
Reference in New Issue
Block a user