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>
Update afterburn to 5.5.1, and remove the patch 0003 for fixing
cross-build issue of arm64, because the upstream fix
https://github.com/coreos/afterburn/pull/1022 is already included in
5.5.1.
- install curl before baselayout
Now that Github rejects access to an unauthenticated URL with
`git://`, we have to make git and libcurl work with
`https://`. However, during the SDK stage2, curl is not explicitly
installed, but just inherited from the stage1. As a result, curl is
built without the `ssl` USE flag. So installation of baselayout
fails with:
```
git fetch https://github.com/flatcar-linux/baselayout.git --prune +HEAD:refs/git-r3/HEAD
fatal: unable to access 'https://github.com/flatcar-linux/baselayout.git/':
Protocol "https" not supported or disabled in libcurl
```
To resolve the issue, we need to install curl with `BOOTSTRAP_USE=ssl`
before trying to install baselayout.
- update openssl before stage3
Right now our bootstrap flow is different then gentoo's - we don't
update the seed when building stage1 and use a different ebuilds
snapshot for stage1 compared to stage2 and stage3. This is causing
us trouble now, because we introduced openssl-3, but seed/stage1
still contains openssl-1.1. During `emerge -e @system` in stage3,
some packages that depend on openssl may build against the stage1
version, which results in an error during depcleaning (they would
need to be rebuilt instead). Stage3 is not extensible, so instead,
explicitly update openssl in stage2. This workaround can be removed
as soon as we release a seed with openssl-3.
Co-authored-by: Dongsu Park <dpark@linux.microsoft.com>
Co-authored-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>