This pulls in https://github.com/flatcar/init/pull/114 to
support a flag to skip providing OEM payloads, with the goal of easing
downgrades to non-sysext-OEM releases or, when backported to LTS with
the default behavior switched, to opt-in to OEM payloads for airgapped
updates that can't use the fallback download.
This change extends the garbage collector for the build cache server to
remove cached release artifacts. Release artifacts are copied to the
official mirrors and do not need to remain on the build cache after a
release was published.
By default, the 10 latest releases of all channels (including LTS and
previous LTS) are kept.
Also excluded from garbage collection are:
- Emerging new major releases (i.e. major number larger than the
latest Alpha release)
- channel progressions (major number exists in the lists of releases to
keep but minor is bigger than any release)
- patch releases (major and minor exist in list of releases to keep but
patch level is newer than in any release)
- SDKs (tarballs and containers) of any release in the list of releases
to keep; i.e. the SDK in <MAJOR>.0.0 for any release to keep.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
gensub is a GNU extension; however, POSIXLY_CORRECT is enforced in
systemd-run which triggers gawk's traditional / posix mode.
Unset it before calling gawk to make gensub available.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This change adds a min_age parameter to the github CI SDK garbage
collector. The parameter specifies a minimum age (in days) for artifacts
to be garbage collected. NOTE that this can result in more artifacts
being kept than specified via the "keep" parameter if artifacts are
younger than min_age.
The change also has garbage_collect.sh pass the min_age parameter to
garbage_collect_github_ci_sdk.sh.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This change improves the build cache garbage collector to remove
orphaned artifact directories - i.e. directories to which no version tag
exists in the scripts repo.
SDK containers built by Github actions (using update_sdk_container) are
igored by this change because these are handled in a separate garbage
collection script.
Also, a new command line parameter has been added to remove artifacts
older than the specified number of days (defaulting to 14):
- If neither number of builds nor max age is specified, the script
defaults to 50 builds to keep, and a max age of 14 days.
The max age overrides the number of builds to keep, so more than
50 builds may be kept.
- If only the number of builds to keep is specified, the max age is
set to "0" (i.e. today).
- If both are specified, max age again overrides number of builds to
keep.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>