This commit is contained in:
Lukas Ziegler 2022-03-18 09:59:38 +01:00
commit 895a2e2467
5 changed files with 425 additions and 0 deletions

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
README.md merge=ours
.gitlab-ci.yml merge=ours
requirements.txt merge=ours

75
.gitignore vendored Normal file
View File

@ -0,0 +1,75 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
/.venv
/.pytest_cache
# C extensions
*.so
# Distribution / packaging
.Python
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
*.eggs
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
# Pycharm
.idea
# Eclipse
.settings
# Visual Studio cache/options directory
.vs/
.vscode
# OSX Files
.DS_Store
# Django stuff:
*.log
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Rope
.ropeproject
# Sphinx documentation
docs/_build/
# Backup files
*~
*.swp
# OCA rules
!static/lib/

315
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,315 @@
image: ubuntu:focal
stages:
- testall
- testsingle
variables:
POSTGRES_DB: postgres
POSTGRES_USER: flectra
POSTGRES_PASSWORD: flectra
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
services:
- name: postgres:12-alpine
alias: psql
test_all_modules:
stage: testall
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt-get install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_all
- psql -h psql -U flectra -d test_all -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_all
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_all
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_all
--test-enable
--init website_product_configurator_mrp,product_configurator_sale,product_configurator,product_configurator_purchase,website_product_configurator,product_configurator_mrp,product_configurator_stock,product_configurator_sale_mrp
--stop-after-init
--log-level error
--log-handler flectra.addons.website_product_configurator_mrp:TEST
--log-handler flectra.addons.product_configurator_sale:TEST
--log-handler flectra.addons.product_configurator:TEST
--log-handler flectra.addons.product_configurator_purchase:TEST
--log-handler flectra.addons.website_product_configurator:TEST
--log-handler flectra.addons.product_configurator_mrp:TEST
--log-handler flectra.addons.product_configurator_stock:TEST
--log-handler flectra.addons.product_configurator_sale_mrp:TEST
"
test_module_website_product_configurator_mrp:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_website_product_configurator_mrp
- psql -h psql -U flectra -d test_website_product_configurator_mrp -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_website_product_configurator_mrp
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_website_product_configurator_mrp
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_website_product_configurator_mrp
--test-enable -i website_product_configurator_mrp
--stop-after-init
--log-level error
--log-handler flectra.addons.website_product_configurator_mrp:TEST"
test_module_product_configurator_sale:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_product_configurator_sale
- psql -h psql -U flectra -d test_product_configurator_sale -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_product_configurator_sale
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_product_configurator_sale
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_product_configurator_sale
--test-enable -i product_configurator_sale
--stop-after-init
--log-level error
--log-handler flectra.addons.product_configurator_sale:TEST"
test_module_product_configurator:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_product_configurator
- psql -h psql -U flectra -d test_product_configurator -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_product_configurator
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_product_configurator
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_product_configurator
--test-enable -i product_configurator
--stop-after-init
--log-level error
--log-handler flectra.addons.product_configurator:TEST"
test_module_product_configurator_purchase:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_product_configurator_purchase
- psql -h psql -U flectra -d test_product_configurator_purchase -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_product_configurator_purchase
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_product_configurator_purchase
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_product_configurator_purchase
--test-enable -i product_configurator_purchase
--stop-after-init
--log-level error
--log-handler flectra.addons.product_configurator_purchase:TEST"
test_module_website_product_configurator:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_website_product_configurator
- psql -h psql -U flectra -d test_website_product_configurator -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_website_product_configurator
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_website_product_configurator
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_website_product_configurator
--test-enable -i website_product_configurator
--stop-after-init
--log-level error
--log-handler flectra.addons.website_product_configurator:TEST"
test_module_product_configurator_mrp:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_product_configurator_mrp
- psql -h psql -U flectra -d test_product_configurator_mrp -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_product_configurator_mrp
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_product_configurator_mrp
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_product_configurator_mrp
--test-enable -i product_configurator_mrp
--stop-after-init
--log-level error
--log-handler flectra.addons.product_configurator_mrp:TEST"
test_module_product_configurator_stock:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_product_configurator_stock
- psql -h psql -U flectra -d test_product_configurator_stock -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_product_configurator_stock
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_product_configurator_stock
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_product_configurator_stock
--test-enable -i product_configurator_stock
--stop-after-init
--log-level error
--log-handler flectra.addons.product_configurator_stock:TEST"
test_module_product_configurator_sale_mrp:
stage: testsingle
when: on_failure
image:
name: registry.gitlab.com/jamotion/flectra/ubuntudev:2-latest
entrypoint: ["/bin/sh", "-c"]
script:
- apt-get install -y p7zip-full
- apt install -y expect-dev
- su - flectra -c "mkdir ~/others"
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8
- mkdir ${CI_PROJECT_DIR}/ci_data
- wget -O ${CI_PROJECT_DIR}/ci_data/test_base.zip https://gitlab.com/flectra-community/devops/oca2fc/raw/master/ci_data/test_base.zip
- 7z x -o ${CI_PROJECT_DIR}/ci_data/ ${CI_PROJECT_DIR}/ci_data/test_base.zip
- export PGPASSWORD="flectra"
- createdb -h psql -U flectra -O flectra -T template1 test_product_configurator_sale_mrp
- psql -h psql -U flectra -d test_product_configurator_sale_mrp -f ${CI_PROJECT_DIR}/ci_data/dump.sql
- su - flectra -c "mkdir -p ~/.local/share/filestore"
- mv ${CI_PROJECT_DIR}/ci_data/filestore /opt/flectra/.local/share/filestore/test_product_configurator_sale_mrp
- chown -R flectra.flectra /opt/flectra/.local/share/filestore/test_product_configurator_sale_mrp
- su - flectra -c "/opt/flectra/flectra-bin
--addons-path ${CI_PROJECT_DIR}
--db_host psql
--db_port 5432
--db_user flectra
--db_password flectra
--database test_product_configurator_sale_mrp
--test-enable -i product_configurator_sale_mrp
--stop-after-init
--log-level error
--log-handler flectra.addons.product_configurator_sale_mrp:TEST"

32
gather_readme.md Normal file
View File

@ -0,0 +1,32 @@
# Flectra Community Module Gather
for i in {1..3}; do
repos=$(curl -s "https://gitlab.com/api/v4/groups/flectra-community/projects?per_page=100&page=${i}")
git config --global merge.ours.driver true
for row in $(echo "${repos}" | jq -r '.[] | @base64'); do
_jq() {
echo ${row} | base64 --decode | jq -r ${1}
}
url=$(_jq '.http_url_to_repo')
name=$(_jq '.name')
echo ${name}
echo ${url}
git remote add $name $url
git fetch $name
git checkout 2.0
git merge --no-edit --allow-unrelated-histories $name/2.0
git merge --no-edit --allow-unrelated-histories $name/2.0-fixed
git checkout 2.0-upstream
git merge --no-edit --allow-unrelated-histories $name/2.0-upstream
git checkout 1.0
git merge --no-edit --allow-unrelated-histories $name/1.0
git checkout 1.0-fixed
git merge --no-edit --allow-unrelated-histories $name/1.0-fixed
git checkout 1.0-upstream
git merge --no-edit --allow-unrelated-histories $name/1.0-upstream
git remote remove $name
git gc --prune=now
done
done

0
requirements.txt Normal file
View File