Try to change the docker tag "latest" setup, and update the CI with this config

This commit is contained in:
2022-12-24 15:46:16 +01:00
parent 98d3df641f
commit 03557b7c15
2 changed files with 11 additions and 4 deletions
+1
View File
@@ -13,3 +13,4 @@ job-build-docker-latest:
- python3 -m pip install --upgrade pip - python3 -m pip install --upgrade pip
- python3 -m pip install -r requirement-build.txt - python3 -m pip install -r requirement-build.txt
- python3 main.py - python3 main.py
- python3 main.py --tag=latest
+10 -4
View File
@@ -2,6 +2,7 @@ import os
import pathlib import pathlib
import json import json
import docker import docker
import sys
# TODO Update readme file badge with blender version # TODO Update readme file badge with blender version
# TODO add a check if the image build are stored in the docker register # TODO add a check if the image build are stored in the docker register
@@ -53,7 +54,12 @@ def build_docker(b3d_version: (str, str), latest: bool = False):
if __name__ == "__main__": if __name__ == "__main__":
version = get_data_from_json() version = get_data_from_json()
print(f'Start -> Setup the package with blender version "{version[0]}.{version[1]}"') print(f'Start -> Setup the package with blender version "{version[0]}.{version[1]}"')
print('Generate image with tag version.') for arg in sys.argv:
build_docker(b3d_version=version) if '--tag=' in arg:
print('Generate image to latest tag.') print(f'Build with the tag "{arg}".')
build_docker(b3d_version=version, latest=True) build_docker(b3d_version=version, latest=True)
break
else:
build_docker(b3d_version=version)
print(f'Start to build the docker file.')
pass