Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
22d7f924
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "d1efefe15e5646c7364b2fa24801dbbad321bde5"
Unverified
Commit
22d7f924
authored
May 10, 2022
by
Rhett Ying
Committed by
GitHub
May 10, 2022
Browse files
[CI] print commit/build ID into comment (#3989)
parent
d4d4fa1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
tests/scripts/ci_report/status.py
tests/scripts/ci_report/status.py
+6
-4
No files found.
tests/scripts/ci_report/status.py
View file @
22d7f924
...
@@ -3,6 +3,7 @@ import requests
...
@@ -3,6 +3,7 @@ import requests
JOB_NAME
=
os
.
getenv
(
"JOB_NAME"
)
JOB_NAME
=
os
.
getenv
(
"JOB_NAME"
)
BUILD_NUMBER
=
os
.
getenv
(
"BUILD_NUMBER"
)
BUILD_NUMBER
=
os
.
getenv
(
"BUILD_NUMBER"
)
BUILD_ID
=
os
.
getenv
(
"BUILD_ID"
)
BUILD_ID
=
os
.
getenv
(
"BUILD_ID"
)
COMMIT
=
os
.
getenv
(
"GIT_COMMIT"
)
job_link
=
os
.
environ
[
"BUILD_URL"
]
job_link
=
os
.
environ
[
"BUILD_URL"
]
response
=
requests
.
get
(
'{}wfapi'
.
format
(
job_link
)).
json
()
response
=
requests
.
get
(
'{}wfapi'
.
format
(
job_link
)).
json
()
...
@@ -12,10 +13,11 @@ for v in response['stages']:
...
@@ -12,10 +13,11 @@ for v in response['stages']:
status
=
"❌ CI test failed in Stage [{}]."
.
format
(
v
[
'name'
])
status
=
"❌ CI test failed in Stage [{}]."
.
format
(
v
[
'name'
])
break
break
comment
=
f
"""
{
JOB_NAME
}
comment
=
f
""" Commit ID:
{
COMMIT
}
\n
{
status
}
\n
Build ID:
{
BUILD_ID
}
\n
Report at [link](https://dgl-ci-result.s3.us-west-2.amazonaws.com/
{
JOB_NAME
}
/
{
BUILD_NUMBER
}
/
{
BUILD_ID
}
/logs/report.html)
\n
Status:
{
status
}
\n
Full logs at [link](https://dgl-ci-result.s3.us-west-2.amazonaws.com/
{
JOB_NAME
}
/
{
BUILD_NUMBER
}
/
{
BUILD_ID
}
/logs/cireport.log)
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
)
print
(
comment
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment