Feat: Firts Test first tests of the environment
This commit is contained in:
parent
b6d78c54cb
commit
b4999f9640
@ -18,6 +18,7 @@ def _main():
|
|||||||
logging.info("MONITOREANDO ARCHIVOS EN %s", SRC)
|
logging.info("MONITOREANDO ARCHIVOS EN %s", SRC)
|
||||||
|
|
||||||
for module in MODULES:
|
for module in MODULES:
|
||||||
|
logging.info('NOMBRE DEL MODULO A MONITOREAR%s', module)
|
||||||
i.add_watch(
|
i.add_watch(
|
||||||
SRC + module)
|
SRC + module)
|
||||||
|
|
||||||
|
@ -7,9 +7,24 @@
|
|||||||
[ ! -d "$SRC" ] && die "no se ubica ruta en SRC"
|
[ ! -d "$SRC" ] && die "no se ubica ruta en SRC"
|
||||||
|
|
||||||
# dependencias minimas
|
# dependencias minimas
|
||||||
pip3 install psycopg2 proteus==6.8.0 inotify honcho qrcode==6.1 pyshp==2.3.1 shapely==2.0.2 numpy==1.26.4
|
pip3 install psycopg2 proteus==6.8.0 inotify honcho qrcode==6.1 pyshp==2.3.1 shapely==2.0.2 scipy==1.13.1 matplotlib==3.9.0
|
||||||
pip3 install git+https://rodia:3sh0r4d3s3gu1r@gitea.onecluster.org/OneTeam/oc-facho.git@MigrationPython312Test
|
pip3 install git+https://rodia:3sh0r4d3s3gu1r@gitea.onecluster.org/OneTeam/oc-facho.git@MigrationPython312Test
|
||||||
pip3 install trytond==6.8.0 trytond-party==6.8.0 trytond-company==6.8.0 trytond-product==6.8.0 trytond-product_image==6.8.0 trytond-currency==6.8.0 trytond-notification_email==6.8.0 trytond-purchase==6.8.0 trytond-sale_price_list==6.8.0
|
pip3 install trytond-country==6.8.0\
|
||||||
|
trytond-company==6.8.0\
|
||||||
|
trytond-party==6.8.0 \
|
||||||
|
trytond-company==6.8.0\
|
||||||
|
trytond-currency==6.8.0\
|
||||||
|
trytond-account_product==6.8.0\
|
||||||
|
trytond-account_invoice_stock==6.8.0\
|
||||||
|
trytond-account_stock_continental==6.8.0\
|
||||||
|
trytond-account_statement==6.8.0\
|
||||||
|
trytond-bank==6.8.0\
|
||||||
|
trytond-product==6.8.0\
|
||||||
|
trytond-product_price_list==6.8.0\
|
||||||
|
trytond-purchase==6.8.0\
|
||||||
|
trytond-sale==6.8.0\
|
||||||
|
trytond-sale_price_list==6.8.0\
|
||||||
|
trytond-notification_email==6.8.0\
|
||||||
|
|
||||||
module_names=()
|
module_names=()
|
||||||
|
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# este script fuerza que los cambios se vean reflejados
|
|
||||||
# directamente en trytond.
|
|
||||||
#
|
|
||||||
# variables exportadas:
|
|
||||||
# - module_name
|
|
||||||
|
|
||||||
[ ! -d "$SRC" ] && die "no se ubica ruta en SRC"
|
|
||||||
|
|
||||||
# dependencias minimas
|
|
||||||
pip3 install psycopg2 proteus==7.0.0 inotify honcho qrcode==6.1 pyshp==2.3.1 shapely==2.0.2
|
|
||||||
pip3 install trytond-party trytond-company trytond-product trytond-product_image trytond-currency trytond-notification_email
|
|
||||||
|
|
||||||
for module in modules/*/; do
|
|
||||||
|
|
||||||
pushd "$module"
|
|
||||||
|
|
||||||
# instalar dependencias de tryton desde paquete
|
|
||||||
python3 setup.py install
|
|
||||||
|
|
||||||
# usamos enlace al paquete
|
|
||||||
python3 setup.py develop
|
|
||||||
|
|
||||||
# instalar modulo
|
|
||||||
trytond_modules_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond/modules
|
|
||||||
module_name=`cat "setup.py" | fgrep -A 1 [trytond.modules] | sed 1d | cut -d '=' -f 1 | tr -d ' \n'`
|
|
||||||
[ ! -d "$trytond_modules_path" ] && die "fallo al ubicar ruta de modulos de trytond"
|
|
||||||
ln -sf "$SRC/$module" "$trytond_modules_path/$module_name"
|
|
||||||
rm -rf "$SRC/$module/$module_name"
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
trytond_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond
|
|
||||||
|
|
||||||
if [ -d "locale_custom" ]; then
|
|
||||||
cp -f "locale_custom/ir/pt.po" "$trytond_path/ir/locale/"
|
|
||||||
fi
|
|
@ -1,8 +1,3 @@
|
|||||||
[web]
|
[web]
|
||||||
listen = 0.0.0.0:8000
|
listen = 0.0.0.0:8000
|
||||||
root=/var/lib/trytond/www
|
root=/var/lib/trytond/www
|
||||||
|
|
||||||
[email]
|
|
||||||
uri = smtps+ssl://alnus@onecluster.org:"F:$VXa4`<~W!~y}@mail.onecluster.org:465
|
|
||||||
from = alnus@onecluster.org
|
|
||||||
|
|
||||||
|
3
.flake8
Normal file
3
.flake8
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[flake8]
|
||||||
|
ignore=E123,E124,E126,E128,E741,W503,E204
|
||||||
|
exclude=.git,__pycache__,docs/source/conf.py,old,build,dist,.dev
|
12
.gitignore
vendored
12
.gitignore
vendored
@ -5,6 +5,8 @@ __pycache__/
|
|||||||
*$py.class
|
*$py.class
|
||||||
*.bk
|
*.bk
|
||||||
|
|
||||||
|
/.vscode
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
|
||||||
@ -24,7 +26,11 @@ lib64/
|
|||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
var/
|
var/
|
||||||
|
bin/
|
||||||
|
include/
|
||||||
wheels/
|
wheels/
|
||||||
|
__pycache__
|
||||||
|
trytond_miac.egg-info/
|
||||||
pip-wheel-metadata/
|
pip-wheel-metadata/
|
||||||
share/python-wheels/
|
share/python-wheels/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
@ -33,7 +39,7 @@ share/python-wheels/
|
|||||||
MANIFEST
|
MANIFEST
|
||||||
|
|
||||||
# PyInstaller
|
# PyInstaller
|
||||||
# Usually these files are written by a python script from a template
|
# Usually these files are written by a python script fkrom a template
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
*.manifest
|
*.manifest
|
||||||
*.spec
|
*.spec
|
||||||
@ -136,6 +142,8 @@ dmypy.json
|
|||||||
# ---> Emacs
|
# ---> Emacs
|
||||||
# -*- mode: gitignore; -*-
|
# -*- mode: gitignore; -*-
|
||||||
*~
|
*~
|
||||||
|
.~*
|
||||||
|
*#
|
||||||
\#*\#
|
\#*\#
|
||||||
/.emacs.desktop
|
/.emacs.desktop
|
||||||
/.emacs.desktop.lock
|
/.emacs.desktop.lock
|
||||||
@ -219,3 +227,5 @@ pyvenv.cfg
|
|||||||
.venv
|
.venv
|
||||||
pip-selfcheck.json
|
pip-selfcheck.json
|
||||||
|
|
||||||
|
.tdd_cache
|
||||||
|
app
|
33
.woodpecker.yml
Executable file
33
.woodpecker.yml
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# variables que puedo usar? https://woodpecker-ci.org/docs/0.15/usage/environment#built-in-environment-variables
|
||||||
|
|
||||||
|
steps:
|
||||||
|
style:
|
||||||
|
image: python:3.9
|
||||||
|
commands:
|
||||||
|
- pip3 install flake8
|
||||||
|
- flake8
|
||||||
|
|
||||||
|
tests:
|
||||||
|
image: python:3.9
|
||||||
|
environment:
|
||||||
|
- SRC=/app
|
||||||
|
- DB_CACHE=/tmp
|
||||||
|
- DB_NAME=trytontest
|
||||||
|
- TRYTOND_DATABASE_URI=postgresql://tryton:tryton@postgres:5432/
|
||||||
|
commands:
|
||||||
|
- pip3 install psycopg2 proteus qrcode==6.1 image==1.5.33
|
||||||
|
- mkdir /app
|
||||||
|
- mv modules /app
|
||||||
|
- mv .dev /app
|
||||||
|
- cd /app
|
||||||
|
- /bin/bash .dev/install_module.sh
|
||||||
|
- python -m unittest discover -s modules
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=tryton
|
||||||
|
- POSTGRES_PASSWORD=tryton
|
||||||
|
- POSTGRES_DB=demo
|
@ -1,79 +0,0 @@
|
|||||||
# CONTRIBUIR
|
|
||||||
---
|
|
||||||
|
|
||||||
>`Para conferir o estado atual do repositório deve ser usada VPN`
|
|
||||||
|
|
||||||
### Requerimentos técnicos
|
|
||||||
|
|
||||||
* `python >= 3.9`
|
|
||||||
* `docker >= 20`
|
|
||||||
* `docker-compose >= 2`
|
|
||||||
* `pre-commit >= 2`
|
|
||||||
* `git >= 2.30`
|
|
||||||
* `rake >= 13`
|
|
||||||
|
|
||||||
### Procedimentos para testes
|
|
||||||
|
|
||||||
1. Iniciar entorno `rake init`
|
|
||||||
2. Iterar con `rake tdd`
|
|
||||||
3. Deter entorno `rake down`
|
|
||||||
4. limpar cache `git clean -xdf`
|
|
||||||
|
|
||||||
### Entorno vivo de desenvolvimento
|
|
||||||
|
|
||||||
0. Crear archivo .env y agregar variable TRYTON_PORT_LIVE="Un puerto libre del sistema"
|
|
||||||
1. Iniciar entorno `rake live:up`
|
|
||||||
2. Conectar cliente Tryton a `localhost:puerto_configurado` **usuário:** `admin` e **senha:** `admin`
|
|
||||||
1. Também pode ser usado o cliente web no `http://localhost:puerto_configurado`
|
|
||||||
2. Para ver saída de `trytond` use `rake live:tail`
|
|
||||||
3. Deter entorno `rake live:down`
|
|
||||||
|
|
||||||
### Despliegue en producción
|
|
||||||
|
|
||||||
0. Copiar .env_sample a .env y configurar las variables de entorno
|
|
||||||
1. Iniciar entorno `rake deploy:up`
|
|
||||||
2. Conectar cliente Tryton a `localhost:puerto_configurado` **usuário:** `admin` e **senha:** `admin`
|
|
||||||
1. Também pode ser usado o cliente web no `http://localhost:puerto_configurado`
|
|
||||||
3. Para ver saída de `trytond` use `rake deploy:tail`
|
|
||||||
4. Deter entorno `rake live:down`
|
|
||||||
5. Eliminar entorno (borrará todos los registros) `rake deploy:del`
|
|
||||||
6. Entrar a la bash del docker `rake deploy:sh_tryton` (otras opciones, sh_cron, sh_worker, sh_nginx, sh_db)
|
|
||||||
7. Ver top de todos los dockers `rake deploy:top`
|
|
||||||
|
|
||||||
### Considerações
|
|
||||||
|
|
||||||
* Evitar trabalho desnecessário
|
|
||||||
* Evitar generalizar: realizar testes inicialmente e depois eliminar duplicidade.
|
|
||||||
* Evitar redundância: automatizar os processos que sejam necessários.
|
|
||||||
* Evitar usar `git add .`
|
|
||||||
* Fazer expressivo o escrito: renomear, realocar ou deletar.
|
|
||||||
* Os testes devem ser executados em todo momento.
|
|
||||||
* O programa deve se manter em execução durante o tempo todo.
|
|
||||||
* Especular, estudar e aprender durante o tempo todo.
|
|
||||||
|
|
||||||
### Considerações sobre os testes
|
|
||||||
|
|
||||||
* Os cenários (`*.rst`) de teste devem ser escritos em português.
|
|
||||||
* Escrever em português o texto para identificador de classe e método em arquivos `*.py`
|
|
||||||
|
|
||||||
### Convenção de `commit`
|
|
||||||
|
|
||||||
As mensagens de `commit` se classificam como:
|
|
||||||
|
|
||||||
* **feat(\<COMPONENTE\>)**
|
|
||||||
* Nova funcionalidade disponibilizada para usuários do Sistema
|
|
||||||
* **fix(\<COMPONENTE\>)**
|
|
||||||
* Corrigir funcionalidades previamente entregues
|
|
||||||
* **chore(\<COMPONENTE\>)**
|
|
||||||
* Outras modificações que não chegam diretamente aos usuários.
|
|
||||||
* Exemplo: renomear arquivos, classes, métodos, variáveis, diretórios, scripts, documentação, recursos digitais e outros.
|
|
||||||
|
|
||||||
> `COMPONENTE` se refere ao nome do diretório
|
|
||||||
|
|
||||||
**Exemplos de `commit`:**
|
|
||||||
|
|
||||||
`git commit -m 'feat(<COMPONENTE>): rutas críticas`
|
|
||||||
|
|
||||||
`git commit -m 'fix(<COMPONENTE>): se adiciona boton faltante`
|
|
||||||
|
|
||||||
`git commit -m 'chore(<COMPONENTE>): cambio de color en columna Cargo`
|
|
@ -1,4 +1,4 @@
|
|||||||
# https://foss.heptapod.net/tryton/tryton-docker/-/blob/branch/default/6.8/Dockerfile
|
# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile
|
||||||
FROM node as builder-node
|
FROM node as builder-node
|
||||||
|
|
||||||
ENV SERIES 6.8
|
ENV SERIES 6.8
|
||||||
@ -13,6 +13,3 @@ RUN apt-get update && apt-get install -y postgresql-client
|
|||||||
|
|
||||||
# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile
|
# TOMADO DE: https://hg.tryton.org/tryton-docker/file/tip/6.6/Dockerfile
|
||||||
COPY --from=builder-node /package /var/lib/trytond/www
|
COPY --from=builder-node /package /var/lib/trytond/www
|
||||||
|
|
||||||
# Copy Sao Personalization
|
|
||||||
# COPY sao_custom/ /var/lib/trytond/www/
|
|
||||||
|
0
Dockerfile_test → Dockerfile_Test
Normal file → Executable file
0
Dockerfile_test → Dockerfile_Test
Normal file → Executable file
114
Rakefile
114
Rakefile
@ -6,18 +6,18 @@ DOCKER_COMPOSE='compose.test.yml'
|
|||||||
|
|
||||||
desc 'iniciar entorno'
|
desc 'iniciar entorno'
|
||||||
task :up do
|
task :up do
|
||||||
compose('up', '--build', '-d', compose: 'compose.test.yml')
|
compose('up', '--build', '-d')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'poblar entorno'
|
desc 'poblar entorno'
|
||||||
task :init => [:up] do
|
task :init => [:up] do
|
||||||
compose('exec', 'test.dev', 'pip3 install psycopg2 flake8 trytond==6.8.0')
|
compose('exec', 'app.dev', 'pip3 install psycopg2 flake8 trytond==6.8.0')
|
||||||
compose('exec', 'test.dev', "bash .dev/install_module.sh")
|
compose('exec', 'app.dev', "bash .dev/install_module.sh")
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'terminal'
|
desc 'terminal'
|
||||||
task :sh do
|
task :sh do
|
||||||
compose('exec', 'test.dev', 'bash')
|
compose('exec', 'app.dev', 'bash')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'iterar'
|
desc 'iterar'
|
||||||
@ -27,23 +27,18 @@ task :tdd, [:name] do |_, args|
|
|||||||
test_dir = ''
|
test_dir = ''
|
||||||
if args.name
|
if args.name
|
||||||
test_dir = "modules/#{args.name}"
|
test_dir = "modules/#{args.name}"
|
||||||
compose('exec', 'test.dev', "bash -c 'cd #{test_dir} && flake8'")
|
compose('exec', 'app.dev', "bash -c 'cd #{test_dir} && flake8'")
|
||||||
compose('exec', 'test.dev', "bash -c 'cd #{test_dir}/tests && python3 -m unittest'")
|
compose('exec', 'app.dev', "bash -c 'cd #{test_dir}/tests && python3 -m unittest'")
|
||||||
else
|
else
|
||||||
compose('exec', 'test.dev', "bash -c 'cd modules && flake8 *'")
|
compose('exec', 'app.dev', "bash -c 'cd modules && flake8 *'")
|
||||||
compose('exec', 'test.dev', "bash -c 'python -m unittest discover -s modules'")
|
compose('exec', 'app.dev', "bash -c 'python -m unittest discover -s modules'")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'detener entorno'
|
desc 'detener entorno'
|
||||||
task :down do
|
task :down do
|
||||||
compose('down', compose: 'compose.test.yml')
|
compose('down')
|
||||||
end
|
|
||||||
|
|
||||||
desc 'eliminar entorno'
|
|
||||||
task :del do
|
|
||||||
compose('down', '-v', '--rmi', 'all', compose: 'compose.test.yml')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'entorno vivo'
|
desc 'entorno vivo'
|
||||||
@ -51,38 +46,22 @@ namespace :live do
|
|||||||
|
|
||||||
desc 'iniciar entorno'
|
desc 'iniciar entorno'
|
||||||
task :up do
|
task :up do
|
||||||
compose('up', '--build', '-d', compose: 'compose.live.yml')
|
compose('up', '--build', '-d', compose: 'compose.yml')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'monitorear salida'
|
desc 'monitorear salida'
|
||||||
task :tail do
|
task :tail do
|
||||||
compose('logs', '-f', 'live.dev', compose: 'compose.live.yml')
|
compose('logs', '-f', 'live.dev', compose: 'compose.yml')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'monitorear salida'
|
|
||||||
task :tail_end do
|
|
||||||
compose('logs', '-f', '-n 50', 'live.dev', compose: 'compose.live.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
desc 'detener entorno'
|
desc 'detener entorno'
|
||||||
task :down do
|
task :down do
|
||||||
compose('down', compose: 'compose.live.yml')
|
compose('down', compose: 'compose.yml')
|
||||||
end
|
|
||||||
|
|
||||||
desc 'detener entorno'
|
|
||||||
task :stop do
|
|
||||||
compose('stop', compose: 'compose.live.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'eliminar entorno'
|
|
||||||
task :del do
|
|
||||||
compose('down', '-v', '--rmi', 'all', compose: 'compose.live.yml')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'reiniciar entorno'
|
desc 'reiniciar entorno'
|
||||||
task :restart do
|
task :restart do
|
||||||
compose('restart', compose: 'compose.live.yml')
|
compose('restart', compose: 'compose.yml')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'terminal'
|
desc 'terminal'
|
||||||
@ -92,67 +71,6 @@ namespace :live do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'produccion'
|
|
||||||
namespace :deploy do
|
|
||||||
|
|
||||||
desc 'iniciar entorno'
|
|
||||||
task :up do
|
|
||||||
compose('up', '--build', '-d', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'monitorear salida'
|
|
||||||
task :tail do
|
|
||||||
compose('logs', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'detener entorno'
|
|
||||||
task :down do
|
|
||||||
compose('down', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'eliminar entorno'
|
|
||||||
task :del do
|
|
||||||
compose('down', '-v', '--rmi', 'all', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'reiniciar entorno'
|
|
||||||
task :restart do
|
|
||||||
compose('restart', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'terminal-tryton'
|
|
||||||
task :sh_tryton do
|
|
||||||
compose('exec', '--user', 'root', 'tryton', '/entrypoint.sh', 'bash', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'terminal-worker'
|
|
||||||
task :sh_worker do
|
|
||||||
compose('exec', '--user', 'root', 'tryton_worker', '/entrypoint.sh', 'bash', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'terminal-cron'
|
|
||||||
task :sh_cron do
|
|
||||||
compose('exec', '--user', 'root', 'tryton_cron', '/entrypoint.sh', 'bash', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'terminal-db'
|
|
||||||
task :sh_db do
|
|
||||||
compose('exec', '--user', 'postgres', 'db', 'bash', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'terminal-nginx'
|
|
||||||
task :sh_nginx do
|
|
||||||
compose('exec', 'nginx', 'bash', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
desc 'top'
|
|
||||||
task :top do
|
|
||||||
compose('top', compose: 'docker-compose.yml')
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def compose(*arg, compose: DOCKER_COMPOSE)
|
def compose(*arg, compose: DOCKER_COMPOSE)
|
||||||
sh "docker-compose -f #{compose} #{arg.join(' ')}"
|
sh "docker-compose -f #{compose} #{arg.join(' ')}"
|
||||||
end
|
end
|
||||||
@ -170,7 +88,7 @@ def refresh_cache
|
|||||||
if try_fossil
|
if try_fossil
|
||||||
changes = %x{fossil diff}.split("\n").grep(/^[-+]/)
|
changes = %x{fossil diff}.split("\n").grep(/^[-+]/)
|
||||||
elsif try_git
|
elsif try_git
|
||||||
changes = %x{git diff}.split("\n").grep(/^[-+]/)
|
changes = %x{git diff -- '*.xml' ':!*view*'}.split("\n").grep(/^[-+index]/)
|
||||||
else
|
else
|
||||||
warn <<WARN
|
warn <<WARN
|
||||||
no se detecta repositorio en control de versiones, debe manualmente
|
no se detecta repositorio en control de versiones, debe manualmente
|
||||||
@ -184,7 +102,7 @@ WARN
|
|||||||
end
|
end
|
||||||
|
|
||||||
def refresh_trytond_cache(changes)
|
def refresh_trytond_cache(changes)
|
||||||
num = changes.grep(/fields/).length
|
num = changes.grep(//).length
|
||||||
hash = Digest::MD5.hexdigest(changes.flatten.join(''))
|
hash = Digest::MD5.hexdigest(changes.flatten.join(''))
|
||||||
|
|
||||||
# touch
|
# touch
|
||||||
@ -194,7 +112,7 @@ def refresh_trytond_cache(changes)
|
|||||||
tdd_cache = cache.read()
|
tdd_cache = cache.read()
|
||||||
|
|
||||||
if num > 0 && (tdd_cache != hash)
|
if num > 0 && (tdd_cache != hash)
|
||||||
compose('exec', 'test.dev', 'bash -c "rm -f /tmp/*.dump"')
|
compose('exec', 'app.dev', 'bash -c "rm -f /tmp/*.dump"')
|
||||||
cache.seek(0); cache.write(hash)
|
cache.seek(0); cache.write(hash)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
401715
common_password.txt
401715
common_password.txt
File diff suppressed because one or more lines are too long
0
compose.deploy.yml
Normal file
0
compose.deploy.yml
Normal file
@ -1,11 +1,9 @@
|
|||||||
version: '3.9'
|
version: '3.9'
|
||||||
services:
|
services:
|
||||||
test.dev:
|
app.dev:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile_test
|
dockerfile: Dockerfile_Test
|
||||||
args:
|
|
||||||
TRYTOND_VERSION: ${TRYTOND_VERSION}
|
|
||||||
environment:
|
environment:
|
||||||
SRC: /app
|
SRC: /app
|
||||||
DB_CACHE: /tmp
|
DB_CACHE: /tmp
|
||||||
@ -14,6 +12,4 @@ services:
|
|||||||
command: sleep 10h
|
command: sleep 10h
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
|
@ -19,7 +19,5 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
ports:
|
ports:
|
||||||
- "${TRYTON_PORT_LIVE:-28000}:8000"
|
- "${TRYTON_PORT:-28000}:8000"
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
# env_file:
|
|
||||||
# - .env
|
|
Loading…
Reference in New Issue
Block a user