From 4572de45630f487b75b8f3983d453d08c122aee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 1 Nov 2023 10:56:12 +0100 Subject: [PATCH 1/2] Use ubuntu jammy image for Odoo 16 --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ Dockerfile | 18 +++++++++++++----- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 412f608..289f694 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,109 +21,131 @@ jobs: include: # odoo/odoo - python_version: "2.7" + codename: focal odoo_version: "8.0" odoo_org_repo: "odoo/odoo" virtualenv_constraint: "<20.22" image_name: py2.7-odoo8.0 - python_version: "2.7" + codename: focal odoo_version: "9.0" odoo_org_repo: "odoo/odoo" virtualenv_constraint: "<20.22" image_name: py2.7-odoo9.0 - python_version: "2.7" + codename: focal odoo_version: "10.0" odoo_org_repo: "odoo/odoo" virtualenv_constraint: "<20.22" image_name: py2.7-odoo10.0 - python_version: "3.5" + codename: focal odoo_version: "11.0" odoo_org_repo: "odoo/odoo" virtualenv_constraint: "<20.22" image_name: py3.5-odoo11.0 - python_version: "3.6" + codename: focal odoo_version: "12.0" odoo_org_repo: "odoo/odoo" setuptools_constraint: "<58" # vatnumber needs setuptools with 2to3 support virtualenv_constraint: "<20.22" image_name: py3.6-odoo12.0 - python_version: "3.6" + codename: focal odoo_version: "13.0" odoo_org_repo: "odoo/odoo" setuptools_constraint: "<58" # vatnumber needs setuptools with 2to3 support virtualenv_constraint: "<20.22" image_name: py3.6-odoo13.0 - python_version: "3.6" + codename: focal odoo_version: "14.0" odoo_org_repo: "odoo/odoo" virtualenv_constraint: "<20.22" image_name: py3.6-odoo14.0 - python_version: "3.8" + codename: focal odoo_version: "14.0" odoo_org_repo: "odoo/odoo" image_name: py3.8-odoo14.0 - python_version: "3.8" + codename: focal odoo_version: "15.0" odoo_org_repo: "odoo/odoo" image_name: py3.8-odoo15.0 - python_version: "3.9" + codename: focal odoo_version: "15.0" odoo_org_repo: "odoo/odoo" image_name: py3.9-odoo15.0 - python_version: "3.10" + codename: jammy odoo_version: "16.0" odoo_org_repo: "odoo/odoo" image_name: py3.10-odoo16.0 # oca/ocb - python_version: "2.7" + codename: focal odoo_version: "8.0" odoo_org_repo: "oca/ocb" virtualenv_constraint: "<20.22" image_name: py2.7-ocb8.0 - python_version: "2.7" + codename: focal odoo_version: "9.0" odoo_org_repo: "oca/ocb" virtualenv_constraint: "<20.22" image_name: py2.7-ocb9.0 - python_version: "2.7" + codename: focal odoo_version: "10.0" odoo_org_repo: "oca/ocb" virtualenv_constraint: "<20.22" image_name: py2.7-ocb10.0 - python_version: "3.5" + codename: focal odoo_version: "11.0" odoo_org_repo: "oca/ocb" virtualenv_constraint: "<20.22" image_name: py3.5-ocb11.0 - python_version: "3.6" + codename: focal odoo_version: "12.0" odoo_org_repo: "oca/ocb" setuptools_constraint: "<58" # vatnumber needs setuptools with 2to3 support virtualenv_constraint: "<20.22" image_name: py3.6-ocb12.0 - python_version: "3.6" + codename: focal odoo_version: "13.0" odoo_org_repo: "oca/ocb" setuptools_constraint: "<58" # vatnumber needs setuptools with 2to3 support virtualenv_constraint: "<20.22" image_name: py3.6-ocb13.0 - python_version: "3.6" + codename: focal odoo_version: "14.0" odoo_org_repo: "oca/ocb" virtualenv_constraint: "<20.22" image_name: py3.6-ocb14.0 - python_version: "3.8" + codename: focal odoo_version: "14.0" odoo_org_repo: "oca/ocb" image_name: py3.8-ocb14.0 - python_version: "3.8" + codename: focal odoo_version: "15.0" odoo_org_repo: "oca/ocb" image_name: py3.8-ocb15.0 - python_version: "3.9" + codename: focal odoo_version: "15.0" odoo_org_repo: "oca/ocb" image_name: py3.9-ocb15.0 - python_version: "3.10" + codename: jammy odoo_version: "16.0" odoo_org_repo: "oca/ocb" image_name: py3.10-ocb16.0 @@ -149,6 +171,7 @@ jobs: uses: docker/build-push-action@v3 with: build-args: | + codename=${{ matrix.codename }} python_version=${{ matrix.python_version }} odoo_version=${{ matrix.odoo_version }} odoo_org_repo=${{ matrix.odoo_org_repo }} @@ -171,6 +194,7 @@ jobs: uses: docker/build-push-action@v3 with: build-args: | + codename=${{ matrix.codename }} python_version=${{ matrix.python_version }} odoo_version=${{ matrix.odoo_version }} odoo_org_repo=${{ matrix.odoo_org_repo }} diff --git a/Dockerfile b/Dockerfile index 58ad5cb..9a2062d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,15 +17,23 @@ RUN apt-get update -qq \ expect-dev # Install wkhtml -RUN curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.$(lsb_release -c -s)_amd64.deb -o /tmp/wkhtml.deb \ +RUN case $(lsb_release -c -s) in \ + focal) WKHTML_DEB_URL=https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb ;; \ + jammy) WKHTML_DEB_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb ;; \ + esac \ + && curl -sSL $WKHTML_DEB_URL -o /tmp/wkhtml.deb \ && apt-get update -qq \ - && dpkg --force-depends -i /tmp/wkhtml.deb \ - && DEBIAN_FRONTEND=noninteractive apt-get install -qq -f --no-install-recommends \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends /tmp/wkhtml.deb \ && rm /tmp/wkhtml.deb # Install nodejs dependencies -RUN curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \ - && echo "deb https://deb.nodesource.com/node_15.x `lsb_release -c -s` main" > /etc/apt/sources.list.d/nodesource.list \ +RUN case $(lsb_release -c -s) in \ + focal) NODE_SOURCE="deb https://deb.nodesource.com/node_15.x focal main" \ + && curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - ;; \ + jammy) NODE_SOURCE="deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg ;; \ + esac \ + && echo "$NODE_SOURCE" | tee /etc/apt/sources.list.d/nodesource.list \ && apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq nodejs # less is for odoo<12 From 4194d9f0ea47c759da6794ce9a07b0f142d92484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 1 Nov 2023 10:56:53 +0100 Subject: [PATCH 2/2] Add Odoo 17 images --- .github/workflows/ci.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 289f694..7c567b3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -84,6 +84,11 @@ jobs: odoo_version: "16.0" odoo_org_repo: "odoo/odoo" image_name: py3.10-odoo16.0 + - python_version: "3.10" + codename: jammy + odoo_version: "17.0" + odoo_org_repo: "odoo/odoo" + image_name: py3.10-odoo17.0 # oca/ocb - python_version: "2.7" codename: focal @@ -149,6 +154,11 @@ jobs: odoo_version: "16.0" odoo_org_repo: "oca/ocb" image_name: py3.10-ocb16.0 + - python_version: "3.10" + codename: jammy + odoo_version: "17.0" + odoo_org_repo: "oca/ocb" + image_name: py3.10-ocb17.0 services: postgres: image: postgres:9.6