Merge branch 'imp-errors-docker-build' into 'main'
[IMP] docker-build: errors if no odoo_requirements file Closes #11 See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!21
This commit is contained in:
commit
4bdfa89758
|
|
@ -20,10 +20,27 @@ def docker_build(ctx, versions):
|
|||
"""Build Odoo Docker Images and pull Postgres image"""
|
||||
|
||||
# Pull DB image
|
||||
logger.info(
|
||||
"Pulling the postgresql docker image. This can take a while..."
|
||||
)
|
||||
pull_image(ctx.obj["config"]["postgres_image_name"])
|
||||
|
||||
# Build images for each odoo version
|
||||
for odoo_version in get_odoo_versions_from_options(ctx, versions):
|
||||
|
||||
odoo_requirement_file_path = (
|
||||
get_odoo_env_path(ctx, odoo_version) / "src/odoo/requirements.txt"
|
||||
)
|
||||
if not odoo_requirement_file_path.exists():
|
||||
logger.error(
|
||||
"Building Odoo docker image for version {odoo_version}, "
|
||||
"because file {odoo_requirement_file_path} cannot be found. "
|
||||
"Have your run the get-code command ?",
|
||||
odoo_version=odoo_version,
|
||||
odoo_requirement_file_path=odoo_requirement_file_path,
|
||||
)
|
||||
continue
|
||||
|
||||
logger.info(
|
||||
"Building Odoo docker image for version '%s'. "
|
||||
"This can take a while..." % (odoo_version)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user