consolidate package triggers into scheduler on the default branch #282
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.
Currently the package scheduler discovers the live branches and triggers the individual workflows in each branch. This is not efficient because a separate workflow runs for each branch, even though the package triggers are all identical (unlike the external triggers).
Also it is not accurate because the scheduler posts on discord all the live branches it discovered as being triggered, but the actual package trigger may skip the trigger due to the github organization secret for pausing package triggers.
This PR consolidates all
package_trigger.yml
function into the singlepackage_trigger_scheduler.yml
running on cron off of the default github branch.It discovers live branches and then determines whether the trigger should run for each branch based on several factors. The discord message has been updated to list triggered and skipped branches as necessary.
This PR requires switching from individual github org secrets such as
PAUSE_PACKAGE_TRIGGER_BASEIMAGE_KASMVNC_ARCH
to a single editable github org variableSKIP_PACKAGE_TRIGGER
, which contains the repos and branches in separate lines in the format ofcontainername_repobranch
all lowercase (ie.baseimage-kasmvnc_arch
)This is due to a limitation of our workflow discovering the branch names runtime, but not being able to procure the value of a github secret with the runtime discovered branch as part of the secret name/key. Afaik github workflows need to hardcode secret names in the workflow.
Tests performed:
python
both live branches containskip_package_check: true
in theirjenkins-vars.yml
therefore package checks are skipped: https://github.com/linuxserver/docker-python/actions/runs/10706886042synclounge
temporarily addedsynclounge_master
toSKIP_PACKAGE_TRIGGER
github org var so trigger is skipped: https://github.com/linuxserver/docker-synclounge/actions/runs/10706957148synclounge
removed fromSKIP_PACKAGE_TRIGGER
and package check is triggered: https://github.com/linuxserver/docker-synclounge/actions/runs/10708211286synclounge
workflow started when there was already an active build and trigger skipped: https://github.com/linuxserver/docker-synclounge/actions/runs/10707027671