Write debug about the tag version and tag latest generated

This commit is contained in:
2022-10-06 13:50:32 +02:00
parent dae516ead7
commit 2868f62455
+7 -4
View File
@@ -17,7 +17,6 @@ def get_data_from_json() -> (str, str):
version_values = data['tags'][0]
major, minor = version_values['b3d_vs_major'], version_values['b3d_vs_minor']
print(f'1 -> Setup the package with blender version "{major}.{minor}"')
return major, minor
@@ -43,14 +42,18 @@ def build_docker(b3d_version: (str, str), latest: bool = False):
tag = f'{args["b3d_vs_major"]}.{args["b3d_vs_minor"]}'
completed_tag_name = f'{docker_repo}:{args["b3d_vs_major"]}.{args["b3d_vs_minor"]}'
print('2 -> Build from image file')
print('\t1 -> Build from image file')
client.images.build(path=os.getcwd(), buildargs=args, tag=completed_tag_name, rm=True, forcerm=True)
print('3 -> Push the new images')
client.images.push(repository=docker_repo, tag=tag)
print(f'\t2 -> Push the new images with tag {tag}')
push = client.images.push(repository=docker_repo, tag=tag, stream=True)
print(f'\t\tDebug push :\n\t\t{push}')
if __name__ == "__main__":
version = get_data_from_json()
print(f'Start -> Setup the package with blender version "{version[0]}.{version[1]}"')
print('Generate image with tag version.')
build_docker(b3d_version=version)
print('Generate image to latest tag.')
build_docker(b3d_version=version, latest=True)