Skip to content

Commit

Permalink
TA#66731 [ADD][16.0] Initiate branch
Browse files Browse the repository at this point in the history
  • Loading branch information
majouda committed Jun 25, 2024
1 parent c8ce58f commit cb5e35f
Show file tree
Hide file tree
Showing 46 changed files with 47 additions and 2,539 deletions.
64 changes: 34 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
version: 2.0

quay_io_login: &quay_io_login
name: Login to Quay.io register
command: docker login quay.io -u "${QUAY_USER}" -p "${QUAY_TOKEN}"

jobs:
tests:
machine: true
Expand All @@ -12,43 +18,41 @@ jobs:
name: Setup Log Folder For Reports
command: sudo mkdir -p .log && sudo chmod 777 .log

- run:
name: Run Test
command: docker-compose run --rm odoo run_pytest.sh

- run:
name: Codacy Coverage
command: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l python -r .log/coverage.xml
# - run:
# name: Run Test
# command: docker-compose run --rm odoo run_pytest.sh

- store_test_results:
path: .log
# - store_test_results:
# path: .log

# job that find the next tag for the current branch/repo and push the tag to github.
# it will trigger the publish of a new docker image.
auto-tag:
machine: true
steps:
- checkout
- run:
name: Get nws
command: |
curl -L $NWS_BIN_LOCATION > ./nws
chmod +x ./nws
- run:
name: Set tag
command: |
./nws circleci create-tag -t odoo-base
# auto-tag:
# machine: true
# steps:
# - checkout
# - run:
# name: Get nws
# command: |
# curl -L $NWS_BIN_LOCATION > ./nws
# chmod +x ./nws
# - run:
# name: Set tag
# command: |
# ./nws circleci create-tag -t odoo-base


workflows:
version: 2
odoo:
jobs:
- tests
- auto-tag:
context: nws
requires:
- tests
filters:
branches:
only: /^1\d\.0/
- tests:
context: quay.io

# - auto-tag:
# context: nws
# requires:
# - tests
# filters:
# branches:
# only: /^1\d\.0/
2 changes: 1 addition & 1 deletion .docker_files/main/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# © 2019 Numigi
# © 2024 Numigi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
6 changes: 2 additions & 4 deletions .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# © 2019 Numigi
# © 2024 Numigi
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
Expand All @@ -11,9 +11,7 @@
"category": "Other",
"summary": "Install all addons required for testing.",
"depends": [
"mrp_production_split",
"product_configurator_mrp_component_ext",
"product_configurator_mrp_enhanced",
"mrp",
],
"installable": True,
}
2 changes: 1 addition & 1 deletion .docker_files/odoo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 4
workers = 0
xmlrpc = True
xmlrpc_interface =
xmlrpc_port = 8069
Expand Down
2 changes: 0 additions & 2 deletions .docker_files/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
freezegun==0.2.0
ddt==1.2.1
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: pre-commit
on:
pull_request:
branches:
- "14.0*"
- "16.0*"
push:
branches:
- "14.0"
- "16.0"

jobs:
pre-commit:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.idea/
venv
extra-addons
log
/.idea
__pycache__/
Expand All @@ -9,7 +8,6 @@ __pycache__/
Pipfile
docker-compose.override.yml
.DS_STORE
.third-party-addons
.pytest_cache
.vscode/
.log
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
FROM quay.io/numigi/odoo-public:14.latest
FROM quay.io/numigi/odoo-public:16.latest
LABEL maintainer="[email protected]"

USER root

COPY .docker_files/test-requirements.txt .
RUN pip3 install -r test-requirements.txt

# Variable used for fetching private git repositories.
ARG GIT_TOKEN

ENV THIRD_PARTY_ADDONS /mnt/third-party-addons
RUN mkdir -p "${THIRD_PARTY_ADDONS}" && chown -R odoo "${THIRD_PARTY_ADDONS}"
COPY ./gitoo.yml /gitoo.yml
RUN gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS}"

USER odoo

COPY mrp_production_split /mnt/extra-addons/mrp_production_split
COPY product_configurator_mrp_component_ext /mnt/extra-addons/product_configurator_mrp_component_ext
COPY product_configurator_mrp_enhanced /mnt/extra-addons/product_configurator_mrp_enhanced

COPY .docker_files/main /mnt/extra-addons/main
COPY .docker_files/odoo.conf /etc/odoo
12 changes: 5 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
- GIT_TOKEN=${GIT_TOKEN}
volumes:
- odoo-web-data:/var/lib/odoo
- odoo16-web-data:/var/lib/odoo
- ./.log:/var/log/odoo
ports:
- "8069:8069"
Expand All @@ -18,16 +16,16 @@ services:
environment:
- LOG_ODOO=/var/log/odoo
db:
image: postgres:13.12
image: postgres:16.0
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
- odoo16-db-data:/var/lib/postgresql/data/pgdata
expose:
- 5432

volumes:
odoo-web-data:
odoo-db-data:
odoo16-web-data:
odoo16-db-data:
9 changes: 1 addition & 8 deletions gitoo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#- url: https://github.com/oca/queue
# branch: "14.0"
# includes:
# - queue_job

- url: https://github.com/OCA/product-configurator
branch: "14.0"
branch: "16.0"
includes:
- product_configurator
- product_configurator_mrp_component
- product_configurator_mrp
105 changes: 0 additions & 105 deletions mrp_production_split/README.rst

This file was deleted.

2 changes: 0 additions & 2 deletions mrp_production_split/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions mrp_production_split/__manifest__.py

This file was deleted.

Loading

0 comments on commit cb5e35f

Please sign in to comment.