Skip to content
Snippets Groups Projects
Commit 4d739e77 authored by Виталий Шунков's avatar Виталий Шунков
Browse files

ci: add debug to fetch tags script

add limit to fetch
parent e6d0f4b1
No related branches found
No related tags found
1 merge request!1268ci: add debug to fetch tags script
Pipeline #50208 failed
...@@ -13,6 +13,7 @@ PROJECT_DIR = pathlib.Path(__file__).parent.parent ...@@ -13,6 +13,7 @@ PROJECT_DIR = pathlib.Path(__file__).parent.parent
def run_shell(path, shell=True, executable='/bin/bash', text=True): def run_shell(path, shell=True, executable='/bin/bash', text=True):
retry = GET_SOURCES_ATTEMPTS retry = GET_SOURCES_ATTEMPTS
limit = 100
timeout = 3 timeout = 3
while retry > 0: while retry > 0:
try: try:
...@@ -27,13 +28,19 @@ def run_shell(path, shell=True, executable='/bin/bash', text=True): ...@@ -27,13 +28,19 @@ def run_shell(path, shell=True, executable='/bin/bash', text=True):
return return
print("fetching tag for", path) print("fetching tag for", path)
subprocess.run( proc = subprocess.run(
"git fetch --deepen 50", "git fetch --deepen 50",
shell=shell, shell=shell,
executable=executable, executable=executable,
text=text, text=text,
cwd="{}/{}".format(PROJECT_DIR, path), cwd="{}/{}".format(PROJECT_DIR, path),
) )
print("stdout={}, stderr={}, code={}".format(
proc.stdout, proc.stderr, proc.returncode))
limit -= 1
if limit < 0:
print("can't fetch tags")
return 2
except Exception as e: except Exception as e:
print("can't run: " + str(e)) print("can't run: " + str(e))
retry -= 1 retry -= 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment