[FIX] release docker execution

This commit is contained in:
Mathieu Benoit 2021-07-20 00:31:15 -04:00
parent faa905526d
commit a657de81f8
3 changed files with 23 additions and 6 deletions

View file

@ -2,11 +2,10 @@
A guide on how to generate a release.
Before starting, validate [manifest/default.dev.xml](../manifest/default.dev.xml) is ready for production.
## Clean environment before generate new release
Before clean, check if existing file not committed, not pushed or in stash.
```bash
./.venv/repo forall -pc "git stash list"
./script/git_show_code_diff_repo_manifest.py
@ -24,9 +23,18 @@ And update all from dev to merge into prod.
./script/install_locally_dev.sh
```
## Update image_db
## Validate environment
Change all default image to improve speed when restoring database. Recreate it manually. Check directory `./image_db`.
- Check [manifest/default.dev.xml](../manifest/default.dev.xml) is ready for production.
- Run test with `make test`
### Update image_db
Run `make image_db_create_all`, this will generate image in directory `./image_db`.
### Test docker generate
Run `make docker_build` to generate a docker.
## Generate new prod and release
@ -39,11 +47,13 @@ Generate production manifest and freeze all repos versions.
Update ERPLIBRE_VERSION variable in [env_var.sh](../env_var.sh) and [Dockerfile.prod](../docker/Dockerfile.prod.pkg).
Generate [poetry](./POETRY.md) and keep only missing dependencies, remove updates.
```bash
./script/poetry_update.py
```
When running script poetry_update.py, note manually inserted dependencies, stash all changes and add it manually.
```bash
poetry add DEPENDENCY
```
@ -60,6 +70,7 @@ git diff v#.#.#..HEAD
```
Simplification tools:
```bash
# Show all divergence repository with production
make repo_diff_manifest_production

View file

@ -29,7 +29,13 @@ ERPLIBRE_DOCKER_PROD_VERSION="${ERPLIBRE_DOCKER_PROD}:${ERPLIBRE_VERSION}"
echo "Create docker ${ERPLIBRE_DOCKER_PROD_VERSION}"
# Rewrite docker-compose
./script/docker_update_version.py --version=${ERPLIBRE_VERSION} --base=${ERPLIBRE_DOCKER_BASE} --prod=${ERPLIBRE_DOCKER_PROD}
./script/docker/docker_update_version.py --version=${ERPLIBRE_VERSION} --base=${ERPLIBRE_DOCKER_BASE} --prod=${ERPLIBRE_DOCKER_PROD}
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Error ./script/docker/docker_build.sh when execute docker_update_version.py"
exit 1
fi
cd docker

View file

@ -5,7 +5,7 @@ import argparse
import logging
import yaml
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool