-
-
Notifications
You must be signed in to change notification settings - Fork 584
Add a scheduler for GitHub workflows #1771
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
base: main
Are you sure you want to change the base?
Add a scheduler for GitHub workflows #1771
Conversation
Signed-off-by: marko-bekhta <marko.prykladna@gmail.com>
| - name: Notify the build failure | ||
| if: ${{ failure() && github.repository == 'hibernate/hibernate-validator'}} | ||
| uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2 | ||
| with: | ||
| api-key: ${{ secrets.ZULIP_GITHUB_WORKFLOW_NOTIFICATION_API_KEY }} | ||
| email: ${{ secrets.ZULIP_GITHUB_WORKFLOW_NOTIFICATION_EMAIL }} | ||
| organization-url: "https://hibernate.zulipchat.com" | ||
| type: "stream" | ||
| to: "hibernate-validator-dev" | ||
| topic: "GitHub workflow failures" | ||
| content: "The GitHub [build #${{github.run_id}}](https://github.com/hibernate/hibernate-validator/actions/runs/${{github.run_id}}) failed and requires your attention :warning:" |
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.
hey @yrodiere
since validator workflows are relatively the fastest ones to run 😃 I thought I'd test things out on them first...
I've added a scheduler to trigger the builds on the branches we have in a limited support state and then this extra step to send a zulip notification if things go wrong. But we'd need to setup a new zulip bot to get that working.
That is, of course 🙂, if you think that this ^ makes sense 🫣 🙂
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 would have preferred email notifications since this is not something we can/should drop everything else to work on, but... we don't have appropriate mailing lists for that for now, and I don't think Commonhaus is ready to provide any (yet).
So the only thing I would ask is: can we somehow move this to a shared action/workflow that we could update independently, avoiding the need to push to every single branch next time we want to change this (e.g. to switch to emails)?
For Jenkins I believe we can do that by moving the notification stuff to a custom function in the pipeline helpers. For GitHub actions I think shared workflows are our only option...
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.
ok, let me try that out ... we might be able to leverage https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action
I'm thinking that the hibernate-jenkins-pipeline-helpers could be a place for this shared action ?
the problem with the email notification is ... that it's not a built in functionality, and I didn't see some reputable send-an-email action, that's how I ended up with the zulip idea...
|



By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on licensing, please check here.