mirror of
https://github.com/wassname/ray.git
synced 2026-09-10 12:38:43 +08:00
[releng]: Quiet Docker Push (and explain why) (#11623)
This commit is contained in:
@@ -203,9 +203,19 @@ def push_and_tag_images(push_base_images: bool):
|
|||||||
|
|
||||||
def docker_push(image, tag):
|
def docker_push(image, tag):
|
||||||
if _merge_build():
|
if _merge_build():
|
||||||
result = DOCKER_CLIENT.api.push(image, tag=tag)
|
|
||||||
print(f"PUSHING: {image}:{tag}, result:")
|
print(f"PUSHING: {image}:{tag}, result:")
|
||||||
print(result)
|
# This docker API is janky. Without "stream=True" it returns a
|
||||||
|
# massive string filled with every progress bar update, which can
|
||||||
|
# cause CI to back up.
|
||||||
|
#
|
||||||
|
# With stream=True, it's a line-at-a-time generator of the same
|
||||||
|
# info. So we can slow it down by printing every couple hundred
|
||||||
|
# lines
|
||||||
|
i = 0
|
||||||
|
for progress_line in DOCKER_CLIENT.api.push(
|
||||||
|
image, tag=tag, stream=True):
|
||||||
|
if i % 100 == 0:
|
||||||
|
print(progress_line)
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
"This is a PR Build! On a merge build, we would normally push "
|
"This is a PR Build! On a merge build, we would normally push "
|
||||||
|
|||||||
Reference in New Issue
Block a user