[ADD] test to see if image exist
This commit is contained in:
parent
2925ef14f4
commit
31db502004
|
|
@ -30,6 +30,7 @@ docker exec db psql --username=odoo --dbname=test_v12 -c "update res_partner set
|
||||||
in ``cli_B_03_run_test.py``...
|
in ``cli_B_03_run_test.py``...
|
||||||
|
|
||||||
|
|
||||||
|
- add
|
||||||
|
|
||||||
# Try gitlab runner
|
# Try gitlab runner
|
||||||
|
|
||||||
|
|
@ -38,3 +39,8 @@ curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-ru
|
||||||
sudo dpkg -i gitlab-runner_amd64.deb
|
sudo dpkg -i gitlab-runner_amd64.deb
|
||||||
|
|
||||||
(https://docs.gitlab.com/runner/install/linux-manually.html)
|
(https://docs.gitlab.com/runner/install/linux-manually.html)
|
||||||
|
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
- check dynamic user id with
|
||||||
|
https://github.com/camptocamp/docker-odoo-project/blob/master/bin/docker-entrypoint.sh
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ from odoo_openupgrade_wizard.tools_postgres import ensure_database
|
||||||
" function to stop.",
|
" function to stop.",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
|
"-i",
|
||||||
"--init-modules",
|
"--init-modules",
|
||||||
type=str,
|
type=str,
|
||||||
help="List of modules to install. Equivalent to -i odoo options.",
|
help="List of modules to install. Equivalent to -i odoo options.",
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,12 @@ def run_container(
|
||||||
auto_remove=False,
|
auto_remove=False,
|
||||||
):
|
):
|
||||||
client = get_docker_client()
|
client = get_docker_client()
|
||||||
|
if not client.images.list(filters={"reference": image_name}):
|
||||||
|
raise Exception(
|
||||||
|
"The image %s is not available on your system."
|
||||||
|
" Did you run 'odoo-openupgrade-wizard docker-build' ?"
|
||||||
|
% image_name
|
||||||
|
)
|
||||||
|
|
||||||
logger.debug("Launching Docker container named %s ..." % (image_name))
|
logger.debug("Launching Docker container named %s ..." % (image_name))
|
||||||
debug_docker_command = "docker run --name %s\\\n" % (container_name)
|
debug_docker_command = "docker run --name %s\\\n" % (container_name)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user