-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🤖 Notify of master failures via slack #1616
Conversation
38046aa
to
ba29ebc
Compare
ba29ebc
to
1f1586f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best would be to add a final job that depends on all of these jobs. I haven't tried it but I think you could ensure it always runs by using if: always()
and then in the part that does the actual notification you can validate if any of the previous jobs failed by doing if: failure()
https://docs.github.com/en/actions/learn-github-actions/expressions#always
https://docs.github.com/en/actions/learn-github-actions/expressions#failure
But im wondering, as if you Let me create a test repo with this to see if it actually works like that. |
shiiiiet, it seems to actually work! https://github.com/Itxaka/test-ci-depends/actions/runs/5597106674 |
fantastic! |
ah yes, the problem I guess its how to depend on everything Like if i depend on core and qemu-acceptance test and core fails, will it trigger? Then that means we still can not notify when building is broken as it wont trigger the notify job as the dependent jobs havent triggered Gonna test that as well. |
wow, this actually works: https://github.com/Itxaka/test-ci-depends/actions/runs/5597190257 Im sure it has changed as I tried the same thing a couple of years ago and it was a no-go. NICE |
This introduces a way for the main branch to notify in the slack channel when failures happen on the main branch. Currently we have no visibility over what happens on the main branhc unless we check manually. And as we are moving more jobs to be run only in the main branch we need to keep up to date on those failures. Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
1f1586f
to
cef8c08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! It's only missing to alwasy put a random gif 🙊
yeah... not too sure about "random" gifs. I dont want it to post gore or something racist into the chat....internet is evil! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fixed the lint and pushing as it wont affect PR tests! |
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #