Skip to content

feat(ci): central scheduled-builds dispatcher with stateless version rotation#361

Open
yuravk wants to merge 1 commit into
AlmaLinux:mainfrom
yuravk:scheduled-central-dispatcher-workflow
Open

feat(ci): central scheduled-builds dispatcher with stateless version rotation#361
yuravk wants to merge 1 commit into
AlmaLinux:mainfrom
yuravk:scheduled-central-dispatcher-workflow

Conversation

@yuravk

@yuravk yuravk commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Add scheduled-builds.yml - the only workflow with an on.schedule trigger. When a cron fires it converts the firing into a real workflow_dispatch of the target unified workflow via gh workflow run, passing version_major as a genuine input (the other inputs take their dispatch defaults automatically). The build workflows therefore carry no schedule handling or input emulation, and their version-aware run-name works natively.

Version selection is a stateless rotation - weeks since the Unix epoch modulo the VERSIONS list (8, 9, 10, 10-kitten) - so every version builds every 4 weeks with no day-of-month coupling and no stored state; adding a major is one list entry and the cycle stretches automatically.

Image-type selection is arithmetic too: the firing cron's hour encodes the type (index = (hour - 2) / 2 into TYPES), giving a 2-hour stagger between image types on Mondays (UTC):
02:17 opennebula-build-test 08:17 azure-build-release-test-publish
04:17 gencloud-build-test 10:17 oci-build-release-test-publish
06:17 aws-build-test-copy-release 12:17 vagrant-build-test-publish
Minute 17 avoids the congested top-of-the-hour cron slot.
gcp-build-test-publish.yml is deliberately not scheduled.

Dispatching with defaults means the FULL pipeline runs, publishing included - a scheduled firing is a real release cycle (AWS releases AMIs + Marketplace + wiki PR, Vagrant publishes boxes to HCP, Azure releases to the gallery + Marketplace drafts, OCI submits a Marketplace draft; tests gate publishing inside each workflow). Version quirks are handled in the dispatch loop: AWS spells Kitten 'kitten_10' (translated), OCI has no Kitten option (skipped on Kitten weeks).

Scheduled firings run only in the AlmaLinux org's almalinux/cloud-images repository; manual workflow_dispatch runs (target_workflow + an optional version override, 'rotation' = what this week's schedule would build) work anywhere for testing and dispatch on the current ref. Uses the default GITHUB_TOKEN with actions:write - workflow_dispatch is exempt from the no-runs-from-GITHUB_TOKEN-events rule, so no PAT is needed.

…rotation

Add scheduled-builds.yml - the only workflow with an on.schedule trigger.
When a cron fires it converts the firing into a real workflow_dispatch of
the target unified workflow via `gh workflow run`, passing version_major
as a genuine input (the other inputs take their dispatch defaults
automatically). The build workflows therefore carry no schedule handling
or input emulation, and their version-aware run-name works natively.

Version selection is a stateless rotation - weeks since the Unix epoch
modulo the VERSIONS list (8, 9, 10, 10-kitten) - so every version builds
every 4 weeks with no day-of-month coupling and no stored state; adding a
major is one list entry and the cycle stretches automatically.

Image-type selection is arithmetic too: the firing cron's hour encodes the
type (index = (hour - 2) / 2 into TYPES), giving a 2-hour stagger between
image types on Mondays (UTC):
  02:17 opennebula-build-test        08:17 azure-build-release-test-publish
  04:17 gencloud-build-test          10:17 oci-build-release-test-publish
  06:17 aws-build-test-copy-release  12:17 vagrant-build-test-publish
Minute 17 avoids the congested top-of-the-hour cron slot.
gcp-build-test-publish.yml is deliberately not scheduled.

Dispatching with defaults means the FULL pipeline runs, publishing
included - a scheduled firing is a real release cycle (AWS releases AMIs +
Marketplace + wiki PR, Vagrant publishes boxes to HCP, Azure releases to
the gallery + Marketplace drafts, OCI submits a Marketplace draft; tests
gate publishing inside each workflow). Version quirks are handled in the
dispatch loop: AWS spells Kitten 'kitten_10' (translated), OCI has no
Kitten option (skipped on Kitten weeks).

Scheduled firings run only in the AlmaLinux org's almalinux/cloud-images
repository; manual workflow_dispatch runs (target_workflow + an optional
version override, 'rotation' = what this week's schedule would build)
work anywhere for testing and dispatch on the current ref. Uses the
default GITHUB_TOKEN with actions:write - workflow_dispatch is exempt
from the no-runs-from-GITHUB_TOKEN-events rule, so no PAT is needed.
@yuravk
yuravk requested a review from andrewlukoshko July 10, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant