Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions ci/scripts/github/github_tvmbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,26 @@ def merge_if_passed_checks(self) -> Optional[Dict[str, Any]]:
return None

def rerun_jenkins_ci(self) -> None:
url = JENKINS_URL + f"job/tvm/job/PR-{self.number}/buildWithParameters"
logging.info(f"Rerunning ci with URL={url}")
if self.dry_run:
logging.info("Dry run, not sending POST")
else:
post(url, auth=("tvm-bot", TVM_BOT_JENKINS_TOKEN))
job_names = [
"tvm-arm",
"tvm-cortexm",
"tvm-cpu",
"tvm-docker",
"tvm-gpu",
"tvm-hexagon",
"tvm-i386",
"tvm-lint",
"tvm-minimal",
"tvm-riscv",
"tvm-wasm",
]
for name in job_names:
url = JENKINS_URL + f"job/{name}/job/PR-{self.number}/buildWithParameters"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we're missing a test here @driazati ?

logging.info(f"Rerunning ci with URL={url}")
if self.dry_run:
logging.info("Dry run, not sending POST")
else:
post(url, auth=("tvm-bot", TVM_BOT_JENKINS_TOKEN))

def rerun_github_actions(self) -> None:
workflow_ids = []
Expand Down Expand Up @@ -684,11 +698,13 @@ def run(pr: PR):
try:
pr.rerun_jenkins_ci()
except Exception as e:
logging.exception(e)
errors.append(e)

try:
pr.rerun_github_actions()
except Exception as e:
logging.exception(e)
errors.append(e)

if len(errors) > 0:
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/jenkins/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def compress_query(query: str) -> str:


def post(url: str, body: Optional[Any] = None, auth: Optional[Tuple[str, str]] = None):
logging.info(f"Requesting POST to", url, "with", body)
logging.info(f"Requesting POST to {url} with {body}")
headers = {}
req = request.Request(url, headers=headers, method="POST")
if auth is not None:
Expand Down