mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: fix default image_tag
Also fix Docker build process return code.
This commit is contained in:
parent
981cb7e1b6
commit
79f7fc9ed2
@ -121,7 +121,7 @@ def docker_run(*args, **kwargs):
|
||||
return _docker_run(*args, **kwargs)
|
||||
|
||||
|
||||
def _docker_run(run_cmd, log_path, build_dir, container_name, image_tag='odoo:DockerDefault', exposed_ports=None, cpu_limit=None, preexec_fn=None, ro_volumes=None, env_variables=None):
|
||||
def _docker_run(run_cmd, log_path, build_dir, container_name, image_tag=False, exposed_ports=None, cpu_limit=None, preexec_fn=None, ro_volumes=None, env_variables=None):
|
||||
"""Run tests in a docker container
|
||||
:param run_cmd: command string to run in container
|
||||
:param log_path: path to the logfile that will contain odoo stdout and stderr
|
||||
@ -133,6 +133,7 @@ def _docker_run(run_cmd, log_path, build_dir, container_name, image_tag='odoo:Do
|
||||
:params ro_volumes: dict of dest:source volumes to mount readonly in builddir
|
||||
:params env_variables: list of environment variables
|
||||
"""
|
||||
image_tag = image_tag or 'odoo:DockerDefault'
|
||||
container_name = sanitize_container_name(container_name)
|
||||
if isinstance(run_cmd, Command):
|
||||
cmd_object = run_cmd
|
||||
|
@ -82,7 +82,7 @@ class Host(models.Model):
|
||||
with open(os.path.join(docker_build_path, 'Dockerfile'), 'w') as Dockerfile:
|
||||
Dockerfile.write(dockerfile.dockerfile)
|
||||
build_process = docker_build(docker_build_path, dockerfile.image_tag)
|
||||
if build_process.returncode != 0:
|
||||
if build_process != 0:
|
||||
dockerfile.to_build = False
|
||||
message = 'Dockerfile build "%s" failed on host %s' % (dockerfile.image_tag, self.name)
|
||||
dockerfile.message_post(body=message)
|
||||
|
Loading…
Reference in New Issue
Block a user