def _GetMostRecentDockerImageFromGcloud(docker_image):
"""Get most recent <docker_image>:tag for this docker_image.
Args:
docker_image: (string) docker image on Google Cloud.
Returns:
docker_image:tag if at least one tag was found for docker_image.
Otherwise, returns None.
"""
tag = subprocess.check_output(
['gcloud', 'container', 'images', 'list-tags',
docker_image, '--limit=1', '--format=value(tags[0])'])
tag = tag.strip()
if not tag:
return None
return '%s:%s' % (docker_image, tag)
run_distributed_benchmarks.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录