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
chenpangpang
transformers
Commits
506899d1
Unverified
Commit
506899d1
authored
May 13, 2022
by
Yih-Dar
Committed by
GitHub
May 13, 2022
Browse files
Fix push CI channel (#17242)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
7198b633
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
.github/workflows/self-push.yml
.github/workflows/self-push.yml
+1
-0
.github/workflows/self-scheduled.yml
.github/workflows/self-scheduled.yml
+1
-0
utils/notification_service.py
utils/notification_service.py
+4
-4
No files found.
.github/workflows/self-push.yml
View file @
506899d1
...
...
@@ -311,6 +311,7 @@ jobs:
CI_SLACK_CHANNEL_ID
:
${{ secrets.CI_SLACK_CHANNEL_ID }}
CI_SLACK_CHANNEL_ID_DAILY
:
${{ secrets.CI_SLACK_CHANNEL_ID_DAILY }}
CI_SLACK_CHANNEL_DUMMY_TESTS
:
${{ secrets.CI_SLACK_CHANNEL_DUMMY_TESTS }}
CI_SLACK_REPORT_CHANNEL_ID
:
${{ secrets.CI_SLACK_CHANNEL_ID }}
CI_EVENT
:
push
# We pass `needs.setup.outputs.matrix` as the argument. A processing in `notification_service.py` to change
# `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
...
...
.github/workflows/self-scheduled.yml
View file @
506899d1
...
...
@@ -353,6 +353,7 @@ jobs:
CI_SLACK_CHANNEL_ID
:
${{ secrets.CI_SLACK_CHANNEL_ID }}
CI_SLACK_CHANNEL_ID_DAILY
:
${{ secrets.CI_SLACK_CHANNEL_ID_DAILY }}
CI_SLACK_CHANNEL_DUMMY_TESTS
:
${{ secrets.CI_SLACK_CHANNEL_DUMMY_TESTS }}
CI_SLACK_REPORT_CHANNEL_ID
:
${{ secrets.CI_SLACK_CHANNEL_ID_DAILY }}
CI_EVENT
:
scheduled
# We pass `needs.setup.outputs.matrix` as the argument. A processing in `notification_service.py` to change
# `models/bert` to `models_bert` is required, as the artifact names use `_` instead of `/`.
...
...
utils/notification_service.py
View file @
506899d1
...
...
@@ -381,7 +381,7 @@ class Message:
print
(
json
.
dumps
({
"blocks"
:
json
.
loads
(
payload
)}))
client
.
chat_postMessage
(
channel
=
os
.
environ
[
"CI_SLACK_CHANNEL_ID
_DAILY
"
],
channel
=
os
.
environ
[
"CI_SLACK_
REPORT_
CHANNEL_ID"
],
text
=
"There was an issue running the tests."
,
blocks
=
payload
,
)
...
...
@@ -393,7 +393,7 @@ class Message:
text
=
f
"
{
self
.
n_failures
}
failures out of
{
self
.
n_tests
}
tests,"
if
self
.
n_failures
else
"All tests passed."
self
.
thread_ts
=
client
.
chat_postMessage
(
channel
=
os
.
environ
[
"CI_SLACK_CHANNEL_ID
_DAILY
"
],
channel
=
os
.
environ
[
"CI_SLACK_
REPORT_
CHANNEL_ID"
],
blocks
=
self
.
payload
,
text
=
text
,
)
...
...
@@ -439,7 +439,7 @@ class Message:
print
(
json
.
dumps
({
"blocks"
:
blocks
}))
client
.
chat_postMessage
(
channel
=
os
.
environ
[
"CI_SLACK_CHANNEL_ID
_DAILY
"
],
channel
=
os
.
environ
[
"CI_SLACK_
REPORT_
CHANNEL_ID"
],
text
=
f
"Results for
{
job
}
"
,
blocks
=
blocks
,
thread_ts
=
self
.
thread_ts
[
"ts"
],
...
...
@@ -462,7 +462,7 @@ class Message:
print
(
json
.
dumps
({
"blocks"
:
blocks
}))
client
.
chat_postMessage
(
channel
=
os
.
environ
[
"CI_SLACK_CHANNEL_ID
_DAILY
"
],
channel
=
os
.
environ
[
"CI_SLACK_
REPORT_
CHANNEL_ID"
],
text
=
f
"Results for
{
job
}
"
,
blocks
=
blocks
,
thread_ts
=
self
.
thread_ts
[
"ts"
],
...
...
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