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()
# List of status of entire job.
# https://javadoc.jenkins.io/hudson/model/Result.html
status = response["status"]
status_output = f"[Debug Only] {status}"
if status == "SUCCESS":
status_output = "✅ CI test succeeded"
elif status == "ABORTED":
status_output = "⚪️ CI test aborted"
else:
for stage in response["stages"]:
# 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
status_output = "✅ CI test succeeded"
for stage in response["stages"]:
# 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"""
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