293 Commits

Author SHA1 Message Date
Mathieu Tortuyaux
5317282f7d
ci-automation/release.sh: lift 'experimental' usage
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-10-23 15:57:09 +02:00
Mathieu Tortuyaux
9a70dc12ab
ci-automation/release.sh: use rclone docker image
rclone was previously called from the Mantle image but it's not the
 case anymore because we need some environment variables (CHANNEL, ARCH,
 etc.)

 Let's switch to the `rclone` Docker image.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-10-23 15:57:08 +02:00
Kai Lueke
6f11b4b847 ci-automation/release.sh: Fix upload to R2
The upload to R2 was added experimentally and we now want to make use of
it. The CHANNEL variable wasn't defined and it failed because of that.

Do the upload for all channels and set the variable up first. Existing
releases should get synced from the current Origin server via a FUSE
mount that we anyway want to rely on for the directory listing that
Caddy creates. Left to decide is how we manage the "current" version
but that is done manually anyway as of now.

Signed-off-by: Kai Lueke <kailuke@microsoft.com>
2025-10-07 15:02:22 +09:00
Mathieu Tortuyaux
ec5572da3b release: sync alpha bincache assets to s3 bucket
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-10-07 15:01:55 +09:00
Mathieu Tortuyaux
c08c4f9c5d
ci-automation/gc: drop openstack occurences
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-09-04 13:35:53 +02:00
Mathieu Tortuyaux
a2fc25895c
ci_automation_common.sh: use long option name
This helps reading the scripts later.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-07-25 09:44:01 +02:00
Thilo Fromm
1571da2f26 ci_automation_common.sh: sign commits to adhere to DCO requirements
This change makes CI sign commits (which should work because CI uses a "regular" github user) as per our new DCO requirements.
2025-07-18 11:20:03 +02:00
Krzesimir Nowak
53d9298c90 ci-automation: Update sdk-bootstrap, packages-tag and upload functions
- Tighten the patterns used for nightly tags detection.
- Compare hashes instead of names to figure out if we are on top of a
  branch (fixes the issue of no nightly tags reachable from the
  release branches). Jenkins is doing `git fetch origin "${branch}";
  git checkout FETCH_HEAD` and this was confusing the `git rev-parse
  --abbrev-ref HEAD` code (it returned `HEAD` instead of `${branch}`).
- Account for possible multiple tags in a single commit.
- Made the tagging fail in dubious situations.
- Reindent the code, modernize a bit.
2025-07-11 20:05:44 +02:00
Krzesimir Nowak
808ece9097 ci-automation: Make tagging code testable through env vars 2025-07-11 20:05:38 +02:00
Krzesimir Nowak
c61d10a031 ci-automation: Use a valid reference
`show_changes_params` is not available in this lexical scope, we
should have been using `show_changes_params_ref`. This has worked so
far only because all the callers of the functions were passing
`show_changes_params` to be referenced by
`show_changes_params_ref`. Just a lucky happenstance.

Spotted by Chewi.
2025-07-10 14:30:24 +02:00
Mathieu Tortuyaux
49279ef371
ci-automation: add akamai testing
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-05-07 09:12:06 +02:00
Krzesimir Nowak
de2ee00de3 ci-automation: Pass image version to kola 2025-03-26 15:33:26 +01:00
Mathieu Tortuyaux
30b8a11dc3
testing/openstack: clean everything before testing
It happens that we have some leftovers instances running in an "error"
state (the error comes from the OpenStack scheduled deletion). This
leads to instance creation error during the test because quota limits
are hit.

Let's clean-up everything before running the new tests.

This won't impact tests from other channels as OpenStack is limited to
one CI job at a time.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-02-27 17:02:30 +01:00
Mathieu Tortuyaux
71bff1af78
hetzner: use different locations for arm64/amd64
Hetzner is having some capacity issues[^1]:
- amd64: CPX plans (CPX11 to CPX51) - Falkenstein (FSN) and Nuremberg (NBG)
- arm64: CAX plans (CAX11 to CAX41) - Helsinki (HEL) and Nuremberg (NBG)

Let's switch the location:
* Helsinki (hel1) for amd64
* Keep Falkenstein (fsn1) for arm64

[^1]: https://status.hetzner.com/incident/aa5ce33b-faa5-4fd0-9782-fde43cd270cf

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-02-12 11:28:58 +01:00
Mathieu Tortuyaux
81905adc39
ci-config: do not use OpenStack gzipped image
In the test we should use the unzipped image, which is the one
documented.

This allows us to drop some modifications to our OpenStack instance.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-12-20 09:54:38 +01:00
Mathieu Tortuyaux
14287b302a
ci-automation: add hetzner testing
No need for garbage collection since one temporary project is allocated with 1h of
lifespan for each run.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Co-authored-by: Julian Tölle <julian.toelle97@gmail.com>
2024-09-09 09:48:28 +02:00
Krzesimir Nowak
f9d68df8dc
Merge pull request #2204 from flatcar/krnowak/add-buildx
Add app-containers/docker-buildx
2024-09-03 15:07:50 +02:00
Mathieu Tortuyaux
16f2327d48
Merge pull request #2213 from flatcar/tormath1/kernel
python: install feedparser for Kernel CVEs fetching
2024-09-02 15:43:38 +02:00
Krzesimir Nowak
9a3e26bf9b build_image,ci-automation: Add app-containers/docker-buildx to docker-flatcar sysext 2024-09-02 14:05:56 +02:00
Mathieu Tortuyaux
f3577f633f
python: install feedparser for Kernel CVEs fetching
packaging is not used with the new version of the show-fixed-kernel-cves
script.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-09-02 09:52:06 +02:00
Krzesimir Nowak
248057db13 ci-automation/image-changes: Simplify a bit
We can strip suffixes using an array notation instead of doing it in a
loop. Also drop an unused architecture parameter.
2024-08-15 14:45:40 +02:00
Krzesimir Nowak
d2ce797d6d ci-automation/image-changes: Print changes in extra sysexts 2024-08-15 14:41:50 +02:00
Jeremi Piotrowski
a35bd4cc38 ci-automation/vendor-testing/azure: Allow passing kola vnet
This adds support for providing a value for the newly introduce
--azure-kola-vnet kola parameter through the environment. This parameter is
meant to indicate that kola is running inside of a vnet in Azure and the kola
created storage account will be restricted to being accessed from that vnet.
This lets us disable public access to storage accounts.

Needs a corresponding change to jenkins jobs, because we have no way of
determining what vnet a worker node is connected to programmatically. So it
needs to be defined by the job.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2024-07-05 14:06:49 +02:00
Krzesimir Nowak
50e7dc571c ci-automation: Drop azure auth flags 2024-07-02 17:05:15 +02:00
Sayan Chowdhury
bacf710f2f
ci-automation/release: add support for Managed idenities
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2024-06-25 02:33:13 +05:30
Mathieu Tortuyaux
0c1aa2a3e2
ci-automation/vm: use gzip for akamai images
akamai expects gzipped images when uploading an image.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-06-19 15:38:03 +02:00
Adrian Vladu
ce19c4ac85 ci-automation/vm: do not compress KubeVirt images
Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
2024-05-13 16:07:42 +03:00
Kai Lüke
0141b6f156
Merge pull request #1952 from flatcar/kai/gc-release
Migrate release AMI gc to ci-automation
2024-04-29 14:03:24 +02:00
Mathieu Tortuyaux
9dfcbe201b
ci-automation/vm: do not compress Scaleway images
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2024-04-26 09:47:29 +02:00
Kai Lueke
e0ac1b5af9 Migrate release AMI gc to ci-automation
The deletion of old release AMIs was still relying on the previous
Jenkins setup. Move this to the ci-automation folder.
2024-04-24 16:52:11 +09:00
Kai Lueke
ff2bea086a ci-automation/vms: Download vmlinuz file before building VM images
After making flatcar_production_pxe.vmlinuz a symlink to
flatcar_production_image.vmlinuz the signature creation didn't work
because the target could not be found.
As we do with the generic image, download the kernel from bincache, too,
before starting the VM image build.
2024-04-19 17:34:47 +09:00
Adrian Vladu
ab2cb0fff3 ci-automation/vms: provide Hyper-V images with .zip compression
On Windows, the .bz2 compression format is not supported by native
tooling and external tools like 7zip need to be installed.

Switching to .zip compression, there will be no need for the extra step
of having external tools.

See: https://github.com/flatcar/Flatcar/issues/1009

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
2024-04-11 15:43:07 +03:00
Kai Lueke
de4eb8f755 Set up symlinks for same image artifacts to remove qemu/qemu_uefi_secure
The qemu and qemu_uefi_secure images have the same contents as the
qemu_uefi image which wastes space on the release server. A similar
case is the PXE vmlinuz which is the same as the regular one, too.

Set up symlinks for same images, and also detect this when compressing
to set up symlinks there as well. To reduce complexity, the qemu and
qemu_uefi_secure images are not supported anymore and the Jenkins or
GitHub CI will skip over them if specified. Users that build their own
images need to adapt, though.
2024-04-09 15:09:29 +02:00
Jeremi Piotrowski
60a45ef0c5 ci-automation/test: Always pull mantle image when running tests
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2024-03-15 14:44:08 +01:00
Jeremi Piotrowski
53e164969f ci: Build sysexts together with image
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2024-03-11 11:57:45 +00:00
Sayan Chowdhury
3627046730 ci-automation: Update to include the qemu_uefi_secure test
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2024-02-26 15:46:13 +01:00
Sayan Chowdhury
16b3a2a10b vendor-testing: Add qemu_uefi_secure, symlinked to qemu.sh
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2024-02-26 15:46:12 +01:00
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