mirror of
https://gitlab.com/stilobique/blender-docker.git
synced 2026-05-27 20:27:47 +02:00
Write debug about the tag version and tag latest generated
This commit is contained in:
@@ -17,7 +17,6 @@ def get_data_from_json() -> (str, str):
|
|||||||
|
|
||||||
version_values = data['tags'][0]
|
version_values = data['tags'][0]
|
||||||
major, minor = version_values['b3d_vs_major'], version_values['b3d_vs_minor']
|
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
|
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"]}'
|
tag = f'{args["b3d_vs_major"]}.{args["b3d_vs_minor"]}'
|
||||||
completed_tag_name = f'{docker_repo}:{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)
|
client.images.build(path=os.getcwd(), buildargs=args, tag=completed_tag_name, rm=True, forcerm=True)
|
||||||
|
|
||||||
print('3 -> Push the new images')
|
print(f'\t2 -> Push the new images with tag {tag}')
|
||||||
client.images.push(repository=docker_repo, 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__":
|
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('Generate image with tag version.')
|
||||||
build_docker(b3d_version=version)
|
build_docker(b3d_version=version)
|
||||||
|
print('Generate image to latest tag.')
|
||||||
build_docker(b3d_version=version, latest=True)
|
build_docker(b3d_version=version, latest=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user