Skip to content

Commit

Permalink
fetch branch commits
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Jul 16, 2024
1 parent 7e087e6 commit e2aed07
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ci/scripts/find-regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,26 @@ def get_env():
return env


def fetch_branch_commits(branch):
cmd = f"git fetch origin {branch}"
result = subprocess.run([cmd], shell=True)
if result.returncode != 0:
print(f"stderr: {result.stderr}")
print(f"stdout: {result.stdout}")
sys.exit(1)


def main():
cmd = sys.argv[1]

if cmd == "start":
env = get_env()
fetch_branch_commits(env["BISECT_BRANCH"])
print("start bisecting")
run_pipeline(env)
elif cmd == "check":
env = get_env()
fetch_branch_commits(env["BISECT_BRANCH"])
print("check pipeline outcome")
commit = get_bisect_commit(env["START_COMMIT"], env["END_COMMIT"])
step = f"run-{commit}"
Expand Down

0 comments on commit e2aed07

Please sign in to comment.