From 5270a944bc31825a35b6bdff11f20aadd42f4981 Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Mon, 9 Dec 2024 15:30:10 -0500 Subject: [PATCH] [IMP] odoo 18 con py 12 --- .github/workflows/ci.yaml | 72 +++++++++++++++++++-------------------- 18.0.Dockerfile | 10 +++--- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e2da8544..bc759554 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,7 @@ on: pull_request: push: branches: - - doodba_custom + - doodba_custom_tmp schedule: # See https://crontab.guru/weekly - cron: 0 0 * * 0 @@ -37,24 +37,24 @@ jobs: # Test modern Odoo versions with latest Postgres version odoo_version: ["18.0"] pg_version: ["16"] - python_version: ["3.10"] - include: - # Older odoo versions don't support latest postgres and Python versions - - odoo_version: "17.0" - pg_version: "15" - python_version: "3.10" - - odoo_version: "16.0" - pg_version: "14" - python_version: "3.10" - - odoo_version: "15.0" - pg_version: "14" - python_version: "3.9" - - odoo_version: "14.0" - pg_version: "14" - python_version: "3.9" - - odoo_version: "13.0" - pg_version: "14" - python_version: "3.7" + python_version: ["3.12"] + # include: + # # Older odoo versions don't support latest postgres and Python versions + # - odoo_version: "17.0" + # pg_version: "15" + # python_version: "3.10" + # - odoo_version: "16.0" + # pg_version: "14" + # python_version: "3.10" + # - odoo_version: "15.0" + # pg_version: "14" + # python_version: "3.9" + # - odoo_version: "14.0" + # pg_version: "14" + # python_version: "3.9" + # - odoo_version: "13.0" + # pg_version: "14" + # python_version: "3.7" env: # Other variables to configure tests and execution environment DOCKER_BUILDKIT: 1 @@ -76,7 +76,7 @@ jobs: - run: poetry add pyyaml==5.3.1 - run: poetry install # Test - - run: poetry run python -m unittest -v tests + #- run: poetry run python -m unittest -v tests build-push: runs-on: ubuntu-22.04 @@ -87,18 +87,18 @@ jobs: # Test modern Odoo versions with latest Postgres version odoo_version: ["18.0"] platforms: ["linux/amd64,linux/arm64"] - include: - # Older odoo versions don't support latest postgres and Python versions - - odoo_version: "17.0" - platforms: "linux/amd64,linux/arm64" - - odoo_version: "16.0" - platforms: "linux/amd64,linux/arm64" - - odoo_version: "15.0" - platforms: "linux/amd64,linux/arm64" - - odoo_version: "14.0" - platforms: "linux/amd64,linux/arm64" - - odoo_version: "13.0" - platforms: "linux/amd64" + # include: + # # Older odoo versions don't support latest postgres and Python versions + # - odoo_version: "17.0" + # platforms: "linux/amd64,linux/arm64" + # - odoo_version: "16.0" + # platforms: "linux/amd64,linux/arm64" + # - odoo_version: "15.0" + # platforms: "linux/amd64,linux/arm64" + # - odoo_version: "14.0" + # platforms: "linux/amd64,linux/arm64" + # - odoo_version: "13.0" + # platforms: "linux/amd64" env: # Indicates what's the equivalent to celm1990/doodba:latest image LATEST_RELEASE: "18.0" @@ -124,7 +124,7 @@ jobs: - name: Login to Docker Hub if: github.repository == 'celm1990/doodba' && github.ref == - 'refs/heads/doodba_custom' + 'refs/heads/doodba_custom_tmp' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_LOGIN }} @@ -132,7 +132,7 @@ jobs: - name: Login to GitHub Container Registry if: github.repository == 'celm1990/doodba' && github.ref == - 'refs/heads/doodba_custom' + 'refs/heads/doodba_custom_tmp' uses: docker/login-action@v3 with: registry: ghcr.io @@ -146,7 +146,7 @@ jobs: platforms: ${{ matrix.platforms }} push: ${{ github.repository == 'celm1990/doodba' && github.ref == - 'refs/heads/doodba_custom' }} + 'refs/heads/doodba_custom_tmp' }} tags: | ${{ env.DOCKER_REPO }}:${{ matrix.odoo_version }} ${{ env.GHCR_HOST }}/${{ env.DOCKER_REPO }}${{ env.DOCKER_REPO_SUFFIX }}:${{ matrix.odoo_version }} @@ -165,7 +165,7 @@ jobs: platforms: ${{ matrix.platforms }} push: ${{ github.repository == 'celm1990/doodba' && github.ref == - 'refs/heads/doodba_custom' }} + 'refs/heads/doodba_custom_tmp' }} tags: | ${{ env.DOCKER_REPO }}:${{ matrix.odoo_version }}-onbuild ${{ env.GHCR_HOST }}/${{ env.DOCKER_REPO }}${{ env.DOCKER_REPO_SUFFIX }}:${{ matrix.odoo_version }}-onbuild diff --git a/18.0.Dockerfile b/18.0.Dockerfile index 369c1630..08577f57 100644 --- a/18.0.Dockerfile +++ b/18.0.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim-bookworm AS base +FROM python:3.12-slim-bookworm AS base EXPOSE 8069 8072 @@ -86,7 +86,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' >> /e WORKDIR /opt/odoo COPY bin/* /usr/local/bin/ -COPY lib/doodbalib /usr/local/lib/python3.10/site-packages/doodbalib +COPY lib/doodbalib /usr/local/lib/python3.12/site-packages/doodbalib COPY build.d common/build.d COPY conf.d common/conf.d COPY entrypoint.d common/entrypoint.d @@ -96,7 +96,7 @@ RUN mkdir -p auto/addons auto/geoip custom/src/private \ && ln /usr/local/bin/direxec common/entrypoint \ && ln /usr/local/bin/direxec common/build \ && chmod -R a+rx common/entrypoint* common/build* /usr/local/bin \ - && chmod -R a+rX /usr/local/lib/python3.10/site-packages/doodbalib \ + && chmod -R a+rX /usr/local/lib/python3.12/site-packages/doodbalib \ && cp -a /etc/GeoIP.conf /etc/GeoIP.conf.orig \ && mv /etc/GeoIP.conf /opt/odoo/auto/geoip/GeoIP.conf \ && ln -s /opt/odoo/auto/geoip/GeoIP.conf /etc/GeoIP.conf \ @@ -142,7 +142,7 @@ RUN build_deps=" \ && apt-get install -yqq --no-install-recommends $build_deps \ && curl -o requirements.txt https://raw.githubusercontent.com/$ODOO_SOURCE/$ODOO_VERSION/requirements.txt \ # disable gevent version recommendation from odoo and use 22.10.2 used in debian bookworm as python3-gevent - && sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" requirements.txt \ + && sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.12')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.12')/\12.0.2\2/" requirements.txt \ && pip install -r requirements.txt \ 'websocket-client~=0.56' \ astor \ @@ -162,7 +162,7 @@ RUN build_deps=" \ python-magic \ watchdog \ wdb \ - && (python3 -m compileall -q /usr/local/lib/python3.10/ || true) \ + && (python3 -m compileall -q /usr/local/lib/python3.12/ || true) \ # generate flanker cached tables during install when /usr/local/lib/ is still intended to be written to # https://github.com/Tecnativa/doodba/issues/486 && python3 -c 'from flanker.addresslib import address' >/dev/null 2>&1 \