Unverified Commit b8ed4d9b authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Revert status.py (#5348)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent e4e01329
...@@ -11,20 +11,14 @@ response = requests.get("{}wfapi".format(JOB_LINK), verify=False).json() ...@@ -11,20 +11,14 @@ response = requests.get("{}wfapi".format(JOB_LINK), verify=False).json()
# List of status of entire job. # List of status of entire job.
# https://javadoc.jenkins.io/hudson/model/Result.html # https://javadoc.jenkins.io/hudson/model/Result.html
status = response["status"] status_output = "✅ CI test succeeded"
status_output = f"[Debug Only] {status}" for stage in response["stages"]:
if status == "SUCCESS": # List of status of individual stage.
status_output = "✅ CI test succeeded" # https://javadoc.jenkins.io/plugin/pipeline-graph-analysis/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/GenericStatus.html
elif status == "ABORTED": if stage["status"] in ["FAILED", "ABORTED"]:
status_output = "⚪️ CI test aborted" stage_name = stage["name"]
else: status_output = f"❌ CI test [{status}] in Stage [{stage_name}]."
for stage in response["stages"]: break
# List of status of individual stage.
# https://javadoc.jenkins.io/plugin/pipeline-graph-analysis/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/GenericStatus.html
if stage["status"] in ["FAILED", "ABORTED"]:
stage_name = stage["name"]
status_output = f"❌ CI test [{status}] in Stage [{stage_name}]."
break
comment = f""" comment = f"""
Commit ID: {COMMIT}\n Commit ID: {COMMIT}\n
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment