-
-
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
Draft
marko-bekhta
wants to merge
1
commit into
hibernate:main
Choose a base branch
from
marko-bekhta:build/add-gh-scheduler-wf
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Scheduled Hibernate Validator Builds | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 0 * * 6' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-maintenance-branches: | ||
| name: Limited support branches build | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| branch: [ '9.0', '8.0', '6.2' ] | ||
| uses: ./.github/workflows/ci.yml | ||
| with: | ||
| branch: ${{ matrix.branch }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-helperscould 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-emailaction, that's how I ended up with the zulip idea...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 put it in https://github.com/hibernate/.github/?
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.
hmm yeah .. I thought about this one initially ... but then thought that the .github one is more of a "special" repository and we'd be bettter with the action/workflow in some CI related repository 🙂
but if you think .github is the place for it 👍🏻 🙂
btw the idea with the shared action didn't play out as I'd wish it to... since for it to work we need to pass the secrets to the action when we use it .. so it means we'd be changing the workflows if we decide to send notifications somewhere else... I'll try the workflow next, but it would probably require some orther changes (e.g. the "current repository" might be not the one from which we've called the workflow 🫣 🙂 and I've used that in the action to decrease the # of input parameters)
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.
At the end of the day, whatever works. But the Quarkus team seems the
.githubrepo is a decent place for shared GitHub Actions workflows, at least: https://github.com/quarkusio/.github/tree/main/.github/workflows