[FIX] release docker execution
This commit is contained in:
parent
faa905526d
commit
a657de81f8
3 changed files with 23 additions and 6 deletions
|
|
@ -2,11 +2,10 @@
|
||||||
|
|
||||||
A guide on how to generate a release.
|
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
|
## Clean environment before generate new release
|
||||||
|
|
||||||
Before clean, check if existing file not committed, not pushed or in stash.
|
Before clean, check if existing file not committed, not pushed or in stash.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./.venv/repo forall -pc "git stash list"
|
./.venv/repo forall -pc "git stash list"
|
||||||
./script/git_show_code_diff_repo_manifest.py
|
./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
|
./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
|
## 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).
|
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.
|
Generate [poetry](./POETRY.md) and keep only missing dependencies, remove updates.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./script/poetry_update.py
|
./script/poetry_update.py
|
||||||
```
|
```
|
||||||
|
|
||||||
When running script poetry_update.py, note manually inserted dependencies, stash all changes and add it manually.
|
When running script poetry_update.py, note manually inserted dependencies, stash all changes and add it manually.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry add DEPENDENCY
|
poetry add DEPENDENCY
|
||||||
```
|
```
|
||||||
|
|
@ -60,6 +70,7 @@ git diff v#.#.#..HEAD
|
||||||
```
|
```
|
||||||
|
|
||||||
Simplification tools:
|
Simplification tools:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Show all divergence repository with production
|
# Show all divergence repository with production
|
||||||
make repo_diff_manifest_production
|
make repo_diff_manifest_production
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,13 @@ ERPLIBRE_DOCKER_PROD_VERSION="${ERPLIBRE_DOCKER_PROD}:${ERPLIBRE_VERSION}"
|
||||||
echo "Create docker ${ERPLIBRE_DOCKER_PROD_VERSION}"
|
echo "Create docker ${ERPLIBRE_DOCKER_PROD_VERSION}"
|
||||||
|
|
||||||
# Rewrite docker-compose
|
# 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
|
cd docker
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import argparse
|
||||||
import logging
|
import logging
|
||||||
import yaml
|
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)
|
sys.path.append(new_path)
|
||||||
|
|
||||||
from script.git_tool import GitTool
|
from script.git_tool import GitTool
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue