Skip to content

Commit

Permalink
[ADD] test-requirements para AUTO_REQUIREMENTS
Browse files Browse the repository at this point in the history
  • Loading branch information
zamberjo committed Jul 4, 2024
1 parent b0c887c commit a04178f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 15.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.8-slim-bullseye AS base

EXPOSE 8069 8072

ARG TARGETARCH
ARG TARGETARCH=amd64
ARG GEOIP_UPDATER_VERSION=6.0.0
ARG WKHTMLTOPDF_VERSION=0.12.5
ARG WKHTMLTOPDF_AMD64_CHECKSUM='dfab5506104447eef2530d1adb9840ee3a67f30caaad5e9bcb8743ef2f9421bd'
Expand Down
8 changes: 7 additions & 1 deletion build.d/200-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from glob import glob
from os.path import basename, join, splitext

from doodbalib import AUTO_REQUIREMENTS, CUSTOM_DIR, FILE_APT_BUILD, SRC_DIR
from doodbalib import (
AGGREGATE, AUTO_REQUIREMENTS, CUSTOM_DIR, FILE_APT_BUILD, SRC_DIR
)
from doodbalib.installer import INSTALLERS, install, logger

# Build dependencies installed before any others
Expand All @@ -15,8 +17,12 @@ for name in INSTALLERS:
req_files = []
if name == "pip" and AUTO_REQUIREMENTS:
req_files += glob(join(SRC_DIR, "*", "requirements.txt"))
if not AGGREGATE: # devel case
req_files += glob(join(SRC_DIR, "*", "test-requirements.txt"))
# Search also in subdirectories
req_files += glob(join(SRC_DIR, "*", "*", "requirements.txt"))
if not AGGREGATE: # devel case
req_files += glob(join(SRC_DIR, "*", "*", "test-requirements.txt"))
# Normal dependency installation
req_files.append(join(CUSTOM_DIR, "dependencies", "%s.txt" % name))
for req_file in req_files:
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ if [[ "${odoo}" != "" ]]; then
-t dockermaster.aurestic.com/nubeaerp/odoo-base:${odoo}.0-onbuild \
-f ${odoo}.0.Dockerfile .

if [[ $? -ne 0 ]]; then
echo "Revisar error. Saliendo."
exit 1
fi

if [[ ${github} -eq 1 ]]; then
echo "[INFO] reTagging image to ghcr.io/aurestic/odoo-base:${odoo}.0-onbuild"
docker tag \
Expand Down
1 change: 1 addition & 0 deletions lib/doodbalib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

CLEAN = os.environ.get("CLEAN") == "true"
AUTO_REQUIREMENTS = os.environ.get("AUTO_REQUIREMENTS") == "true"
AGGREGATE = os.environ.get("AGGREGATE") == "true"
LOG_LEVELS = frozenset({"DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"})
FILE_APT_BUILD = os.path.join(CUSTOM_DIR, "dependencies", "apt_build.txt")
PRIVATE = "private"
Expand Down

0 comments on commit a04178f

Please sign in to comment.