Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions setup-devel.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ services:
COMPILE: "false"
UID: "${UID:-1000}"
GID: "${GID:-1000}"
GIT_AUTOSHARE: "1"
networks:
- public
volumes:
- ./odoo/custom/src:/opt/odoo/custom/src:rw,z
- ~/.cache/git-autoshare/:/home/odoo/.cache/git-autoshare/:rw,z
environment:
DEPTH_DEFAULT: 100
# XXX Export these variables before running setup to own the files
UID: "${UID:-1000}"
GID: "${GID:-1000}"
UMASK: "$UMASK"
GIT_AUTOSHARE: "1"
user: root
entrypoint: autoaggregate

Expand Down
8 changes: 8 additions & 0 deletions tasks_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
from invoke import exceptions, task
from invoke.util import yaml

HOME = int(os.environ.get("HOME", 4))
PROJECT_ROOT = Path(__file__).parent.absolute()
SRC_PATH = PROJECT_ROOT / "odoo" / "custom" / "src"
UID_ENV = {"GID": str(os.getgid()), "UID": str(os.getuid()), "UMASK": "27"}
SERVICES_WAIT_TIME = int(os.environ.get("SERVICES_WAIT_TIME", 4))
GIT_AUTOSHARE_CACHE_DIR = int(os.environ.get("GIT_AUTOSHARE_CACHE_DIR", 4))
ODOO_VERSION = float(
yaml.safe_load((PROJECT_ROOT / "common.yaml").read_text())["services"]["odoo"][
"build"
Expand Down Expand Up @@ -403,6 +405,12 @@ def git_aggregate(c):

Executes git-aggregator from within the doodba container.
"""
# Create git-autoshare cache folder if it doesn't exist
if GIT_AUTOSHARE_CACHE_DIR:
git_autoshare_cache_dir = Path(GIT_AUTOSHARE_CACHE_DIR)
else:
git_autoshare_cache_dir = Path(HOME) / ".cache" / "git-autoshare"
git_autoshare_cache_dir.mkdir(exist_ok=True)
with c.cd(str(PROJECT_ROOT)):
c.run(
"docker-compose --file setup-devel.yaml run --rm odoo",
Expand Down