Skip to content

Commit

Permalink
TA#69677 TA#69678 [IMP] Replace PostgreSql Deprecated Repository + De…
Browse files Browse the repository at this point in the history
…freeze Odoo (#142)

* TA#69677 [IMP] Replace PostgreSql Deprecated Repository

PostgreSQL repository not being available for the Debian "buster" release
Replacing buster-pgdg with bullseye-pgdg

* TA#69678 [UPD] Defreeze Odoo Public V12

* TA#69677 [UPD] Add CicleCi no_output_timeout

* Update Dockerfile

* Add onchange_helper to main module depends

* TA#69677 [FIX] Unit test execution
  • Loading branch information
majouda authored Oct 1, 2024
1 parent 24fb6d6 commit 8a63cbd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ quay_io_login: &quay_io_login
gitoo_install_odoo: &gitoo_install_odoo
name: Gitoo install odoo source code
command: ./gitoo-install-odoo.sh
no_output_timeout: 15m

gitoo_install_extra_addons: &gitoo_install_extra_addons
name: Gitoo install extra addons
Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
command: docker-compose run --rm odoo odoo --stop-after-init -i main
- run:
name: Run our tests
command: docker-compose run --rm odoo run_pytest.sh
command: sudo docker-compose run --rm -u root odoo /usr/local/bin/run_pytest.sh

deploy:
machine: true
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

# Install latest postgresql-client (copied from the official odoo image)
RUN set -x; \
echo 'deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
echo 'deb https://apt-archive.postgresql.org/pub/repos/apt buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& export GNUPGHOME="$(mktemp -d)" \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
Expand Down Expand Up @@ -73,11 +73,11 @@ RUN pip3 install -r /odoo-requirements.txt -r extra-requirements.txt && \

# Files to run the tests
# run_pytest to run the test with pytest-odoo
COPY ./docker_files/run_pytest.sh /usr/local/bin/
COPY --chown=odoo ./docker_files/run_pytest.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/run_pytest.sh

# Configuration of the coverage report
COPY ./.coveragerc .
COPY --chown=odoo ./.coveragerc .

ENV ODOO_HOME /home/odoo
RUN useradd -d "${ODOO_HOME}" -m -s /bin/bash odoo
Expand Down Expand Up @@ -105,7 +105,7 @@ EXPOSE 8069 8071

ENV ODOO_DIR /usr/local/lib/python3.8/site-packages
COPY .odoo-source-code ${ODOO_DIR}
COPY .extra-addons ${ODOO_DIR}/odoo/addons
COPY .extra-addons "${EXTRA_ADDONS}"

COPY --chown=odoo /docker_files/odoo-bin /bin/odoo
RUN chmod +x /bin/odoo
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
version: '3'
services:
odoo:
build:
context: .
dockerfile: Dockerfile
volumes:
- odoo-web-data:/var/lib/odoo
- odoo-web-data:/usr/local/lib/python3.8/site-packages
- ./log:/var/log/odoo
# Inject the addons as a volume as the addons are just here to test the setup for the next step in the
# docker pipeline.
- ./docker_files/odoo_specific.conf:/etc/odoo/odoo_specific.conf
- ./docker_files/main:/mnt/extra-addons/main
- .extra-addons:/mnt/extra-addons
ports:
- "8069:8069"
- "8071:8071"
Expand Down
2 changes: 1 addition & 1 deletion docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'category': 'Other',
'summary': 'Tests to make sure the setup is as wanted.',
'depends': [
'base_view_inheritance_extension',
'onchange_helper',
],
'data': [],
'installable': True,
Expand Down
6 changes: 0 additions & 6 deletions gitoo-addons.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
- url: https://github.com/oca/server-tools
branch: "12.0"
patches:
# PR: https://github.com/OCA/server-tools/pull/1529
- url: https://github.com/akretion/server-tools
branch: 12.0-mig-base_view_inheritance_extension
commit: 61a83bb372dc83d6344993034ad0ee6123846d53
includes:
- base_view_inheritance_extension
- onchange_helper
2 changes: 1 addition & 1 deletion gitoo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- url: https://github.com/odoo/odoo
branch: "12.0"
commit: 1cd878877c048beff61191e2e077bb96202ffe9a
commit: ba1ba88874e2ae9716e59ec199eb739d58c3f771
base: true
patches:
- file: patches/enable-specific-conf.patch
Expand Down

0 comments on commit 8a63cbd

Please sign in to comment.