"vscode:/vscode.git/clone" did not exist on "ca14488608048cb786e66a923cb050cd1343f40a"
Unverified Commit 22d7f924 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[CI] print commit/build ID into comment (#3989)

parent d4d4fa1e
......@@ -3,6 +3,7 @@ import requests
JOB_NAME = os.getenv("JOB_NAME")
BUILD_NUMBER = os.getenv("BUILD_NUMBER")
BUILD_ID = os.getenv("BUILD_ID")
COMMIT = os.getenv("GIT_COMMIT")
job_link = os.environ["BUILD_URL"]
response = requests.get('{}wfapi'.format(job_link)).json()
......@@ -12,10 +13,11 @@ for v in response['stages']:
status = "❌ CI test failed in Stage [{}].".format(v['name'])
break
comment = f""" {JOB_NAME}
{status} \n
Report at [link](https://dgl-ci-result.s3.us-west-2.amazonaws.com/{JOB_NAME}/{BUILD_NUMBER}/{BUILD_ID}/logs/report.html) \n
Full logs at [link](https://dgl-ci-result.s3.us-west-2.amazonaws.com/{JOB_NAME}/{BUILD_NUMBER}/{BUILD_ID}/logs/cireport.log)
comment = f""" Commit ID: {COMMIT}\n
Build ID: {BUILD_ID}\n
Status: {status} \n
Report path: [link](https://dgl-ci-result.s3.us-west-2.amazonaws.com/{JOB_NAME}/{BUILD_NUMBER}/{BUILD_ID}/logs/report.html) \n
Full logs path: [link](https://dgl-ci-result.s3.us-west-2.amazonaws.com/{JOB_NAME}/{BUILD_NUMBER}/{BUILD_ID}/logs/cireport.log)
"""
print(comment)
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