[skip ci] Add new func on update file (#12552)

Signed-off-by: wangting0128 <ting.wang@zilliz.com>
pull/12553/head
wt 2021-12-01 17:43:32 +08:00 committed by GitHub
parent 5904257622
commit 0a8838baf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -105,6 +105,20 @@ def get_latest_tag(limit=200):
return latest_tag
def get_image_tag():
url = ""
headers = {"accept": "application/json"}
try:
rep = requests.get(url, headers=headers)
data = json.loads(rep.text)
tag_name = data[0]["tags"][0]["name"]
print("[benchmark update] The image name used is %s" % str(tag_name))
return tag_name
except:
print("Can not get the tag list")
return "master-latest"
def parse_server_tag(server_tag):
""" paser server tag from server config"""
# tag format: "8c"/"8c16m"/"8c16m1g"