Commit Graph

256 Commits

Author SHA1 Message Date
Thilo Fromm
ce35091455 garbage_collect_releases.sh: more readable variables in AWK script
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2024-02-14 18:30:12 +01:00
Thilo Fromm
bd3d4c19e2
garbage_collect: no quotes for subshell exec assignments
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2024-02-14 14:58:02 +01:00
Thilo Fromm
88857b496a garbage_collect_releases: fix silent fail, keep all relevant SDKs
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2024-02-12 17:51:32 +01:00
Thilo Fromm
9359a83299
Apply suggestions from code review
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2024-02-12 16:07:40 +01:00
Thilo Fromm
2d5c17cb3c ci-automation/garbage_collect: add cached release artifacts
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>
2024-01-30 14:59:00 +01:00
Thilo Fromm
8bc10465e0 ci-automation/garbage_collect*: unset POSIXLY_CORRECT for awk
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>
2024-01-30 09:49:57 +01:00
Thilo Fromm
521d2be604
ci-automation/garbage_collect.sh: Fix typo
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2024-01-29 12:40:50 +01:00
Thilo Fromm
aaf9deac28 ci-automation/garbage_collect_github_ci_sdk.sh: add min_age parameter
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>
2024-01-26 15:47:54 +01:00
Thilo Fromm
682dbfe365 ci-automation/garbage_collect.sh: min age, orphan removal
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>
2024-01-26 14:57:58 +01:00
Thilo Fromm
aa9927acf3 build_dev_binpkgs: Ensure adevcontainer binpkgs are built
This change introduces build_dev_binpkgs, a script to build binary
packages for all dependencies of the devcontainer. This works around an
issue with build_packages, which doesn't - leading to build issues with
the devcontainer later on. This particularly happens for more complex
builds with the devcontainer.

Additionally, a call to build_dev_binpkgs has been added to the package
publishing step in ci-automation before binary packages are published.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-12-18 10:46:05 +01:00
Krzesimir Nowak
4596a135bc
Merge pull request #1425 from flatcar/krnowak/image-changes-lts
ci-automation/image-changes: Get proper last release version for LTS channels
2023-11-28 08:12:42 +01:00
Krzesimir Nowak
c2a2890d86 ci-automation: Bring back the docker-cli package to docker sysext
The base_sysexts.sh file was based on old version of the default
parameter of the ./build_image script. Sync them now.
2023-11-27 14:54:59 +01:00
Krzesimir Nowak
1c2fec4abc ci-automation/image-changes: Get proper version for LTS channel
The refactored image changes script will eventually be run for the old
LTS version, so make sure that the script for that channel will get a
last release of old LTS instead of new LTS.
2023-11-27 11:30:01 +01:00
Krzesimir Nowak
3e8bd5b8ee ci-automation/image-changes: Factor out curl invocation 2023-11-27 11:30:01 +01:00
Krzesimir Nowak
d3e903db33 ci-automation/image-changes: Simplify getting a major version 2023-11-27 11:29:58 +01:00
Mathieu Tortuyaux
768dc621b3
Merge pull request #1419 from flatcar/tormath1/brightbox
ci-automation: add brightbox testing
2023-11-24 15:19:20 +01:00
Mathieu Tortuyaux
477f03b23f
ci-automation: add brightbox testing
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-11-23 18:27:12 +01:00
Krzesimir Nowak
3d4ddf8645 ci-automation/base-sysexts: Simplify
No need in making it arch-specific.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
a87a8821fe ci-automation/image-changes: Avoid swallowing errors 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
00dad31c11 ci-automation/image-changes: Meh 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
810306c884 ci-automation/image-changes, .github/ci: Further deduplication 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
71eed26ee0 overlay, ci-automation: Try making common-oem-files a valid ebuild
Assignment of EAPI must be the first non-comment, non-blank line in
the ebuild, otherwise portage masks it as corrupted.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
8a75eba906 overlay, ci-automation: Another attempt at providing OEMID info
Please read the comment at the top of the coreos-base/common-oem-files
ebuild for details.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
f542807a9e overlay, ci-automation: Factor out OEMID info to a separate file
Image changes job needs a list of OEMIDs that are built for a specific
architecture. Similar information already existed in the
coreos-base/common-oem-files ebuild, so factor it out to a separate
file, so the image changes job does not need to source the entire
ebuild (or process it in other way), but rather source the smaller
file.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
c5b8a80d36 ci-automation: List built base sysext explicitly
Instead of depending on default value of build_image's base_sysext
parameter, create a file that explicitly lists which base sysexts will
be built for each architecture. The file can be sourced by other
scripts that need this kind of information. Currently, image.sh and
image_changes.sh use this file.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
dabb54783d .github/ci, ci-automation/image-changes: Print diffs for base sysexts 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
ead79f989c ci-automation/image-changes: Source version.txt
This avoid messing with quotes.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
d373052ca4 ci-automation/image-changes: Filter out OEM IDs not built for an arch
This is to limit the amount of reports consisting purely of failures,
because some files were missing. And those files will be missing,
because an OEM might not even have any image for certain arches (like
digitalocean has no arm64 images).
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
8b5e6f0f2c ci-automation/image-changes: Do not expect HEAD commit to have a tag
It certainly does happen on GitHub Actions that the HEAD commit has no
tag. In such case, fake the tag from version file. The git tag in this
scenario is used to figure out a channel transition.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
7698016439 ci-automation/image-changes: Document - as standard output 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
170e17a673 ci-automation/image-changes: Second parameter is not optional 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
cda692ad3c ci-automation/image-changes: Strip kernel versions in initrd reports
This is something that we already do for production image and for OEM
sysext images.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
123ae2471f ci-automation/image-changes: Make messages stand out 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
50b515ee32 ci-automation/image-changes: Expect HEAD commit to have a tag 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
2c7af82d75 ci-automation/image-changes: Shrink a clone of flatcar-build-script 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
f9e0363bf0 ci-automation/image-changes, .github/ci: Add reports against last nightly 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
5915caff21 ci-automation/image-changes: Set NEW_VERSION in toplevel function
This avoid assuming that the current working directory in the
generate_image_changes_report function is actually toplevel directory
of the scripts repo.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
ffa2bfc695 ci-automation/image-changes, .github/ci: Set up env for show-changes 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
5443a66c91 ci-automation/image-changes, .github/ci: Show changes in OEM sysext images 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
992db543d1 ci-automation/image-changes, .github/ci: Drop work directory parameter
It was only needed for the show-changes script. Now that show-changes
script allows to set the repos parent directory with an environment
variable, we set the variable instead of changing the working
directory.
2023-11-21 16:00:00 +01:00
Kai Lueke
87ff566aae Use OpenStack image for Brightbox
The special Brightbox image uses the OpenStack userdata in Ignition but
lacked Afterburn usage. It actually works to use the OpenStack image and
directly which also enables Afterburn, thus we can drop the special
image.
Don't build a special image for Brightbox but recommend to use OpenStack
images directly. A symlink is added to help with the download of
hardcoded user scripts.
2023-11-15 13:33:55 +01:00
Kai Lueke
93544735df ci-automation/vms: Provide OpenStack image without external compression
For Brightbox we can use the OpenStack image but the import only works
with unpacked images. After we enabled internal qcow2 compression the
.gz or .bz2 external compression doesn't provide any benefits and makes
the import more complicated.
Provide the OpenStack image without external compression in addition.
The other files are kept for now but we could also delete them if we
announce this in advance.
2023-11-15 12:47:41 +01:00
Thilo Fromm
b33a9089b0 test qemu_update.sh: Add docker btrfs backwards compat test
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-10-30 17:21:26 +01:00
Thilo Fromm
b775036a62 torcx removal: address PR comments
- updated github actions for runc, containerd, and docker to not handle
  nonexistent ebuilds in app-torcx/ anymore
- removed spurious package_run_dependencies from build_image_util.sh
- build_sysext: generate pkginfo before mangle script runs
  use zstd for compression; add cli flag to select compression
- ci_automation_common.sh: remove spurious `/` from match string
- coreos, board-packages, bootengine: bump ebuild revisions
- kernel commonconfig: add squashfs zstd support

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-10-23 16:05:45 +02:00
Thilo Fromm
57ed77ea91 ci-automation: fix local image detection for nightly SDKs
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-10-23 16:05:45 +02:00
Thilo Fromm
8ef820ad20 vendor-testing/qemu_update.sh: make update payload configurable
This change makes QEMU_UPDATE_PAYLOAD configurable via
ci-automation/settings.env where it was hard-wired before.

The change also fixes fall-out in qemu_update.sh by ensuring a local tmp
directory is created before it is used by the test.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-10-23 16:05:45 +02:00
Thilo Fromm
e85ca4984c ci-automation: remove torcx artifact handling and tests 2023-10-23 16:05:45 +02:00
Krzesimir Nowak
712b0894ee
Merge pull request #1247 from flatcar/krnowak/fix-check
ci-automation: Update the SDK container extension in check
2023-10-10 18:17:30 +02:00
Krzesimir Nowak
2e2aae7af5 ci-automation: Update the SDK container extension in check
We have switched to zst for SDK container tarballs.
2023-10-10 12:52:44 +02:00
Jeremi Piotrowski
fe117dc1d9 ci-automation: Switch to managed identity on azure
Switch to using a managed identity instead of file based credentials for
running kola/ore (not plume). This covers our test subscription, but not our
publishing subscription.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-10-04 12:14:09 +02:00