50 Commits

Author SHA1 Message Date
Mathieu Tortuyaux
14fcef60fe
ci: use ubuntu self hosted runners
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2025-06-05 09:11:59 +02:00
James Le Cuirot
d1ba9b19fb
Switch from raw (.fd) EDK2 firmware images to QCOW2, plus 4MB on amd64
The new arm64 firmware supporting Secure Boot (see next commit) is in
QCOW2 format only, avoiding the extra space taken up by the 64MB
padding. Supporting both raw and QCOW2 images would be messy, so switch
entirely to QCOW2.

Only the 4MB images are in QCOW2 format on amd64, so also switch away
from the 2MB images. 4MB images are now the default for most
distributions as they are needed to apply certain Windows updates.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2024-11-12 11:59:40 +00:00
Kai Lueke
5055ad99bb .github: Add Flatcar extensions to vm-images artifact
The Flatcar extensions get built by the GitHub PR CI but only their
content files get archived. Add the .raw image itself so that one can
copy it into the image (downloading it at boot time won't work because
this uses bincache - so one could get an extension image in case the but
version happens to match but it won't be the one that was built in the
GitHub CI).
2024-05-02 19:05:15 +09:00
Kai Lueke
f5a172deb8 .github: Add flatcar_production_qemu.sh to generic image zip
When downloading the generic image to run a test it would be nice to
have the qemu script in the zip bundle.
2024-04-10 20:37:42 +09:00
Kai Lueke
bc0e34c04f .github: Remove bz2 compression layer from zip artifacts
The GitHub Action artifacts are compressed zip files which include
bz2 files which are either the raw .bin images that have many zero bytes
in the rootfs but the main data in /usr is using zstd compression, or
they are the qcow2 .img images which are compressed themselves (and of
course have the same /usr compression). The bz2 compression doesn't help
in our case.
Remove the bz2 compression layer. If in the future non-zip artifacts
are supported we can add it back for the .bin image only by using
explicit calls only for that file instead of the
--image_compression_formats= flag for all images.
2024-04-10 20:28:23 +09: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
53e164969f ci: Build sysexts together with image
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2024-03-11 11:57:45 +00:00
Kai Lueke
e1fc7a808d .github: Build PXE image as additional VM image format
The PXE image and its helper script is a very handy way to test an image
because it does not preserve state. One can boot the same file over and
over again without having to reset the image. One can also easily pass
in additional kernel cmdline options without having to set up grub.cfg.
2024-03-05 16:35:03 +01:00
Krzesimir Nowak
a7926df927 .github: Bump github actions 2024-02-07 17:50:06 +01:00
Krzesimir Nowak
a39e53aed3 .github/ci: Install python3-packaging package
show-fixed-kernel-cves.py script from flatcar-build-scripts requires
this package:

Traceback (most recent call last):
  File "/home/runner/actions-runner/_work/scripts/scripts/flatcar-build-scripts/show-fixed-kernel-cves.py", line 29, in <module>
    from packaging import version
ModuleNotFoundError: No module named 'packaging'
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
89f0cba474 .github/ci: Deduplicate the image changes job 2023-11-21 16:00:00 +01:00
Krzesimir Nowak
0490c9c672 .github/ci: Report about base sysexts for against last nightly too 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
5b3e90eceb .github/ci: Fix artifacts paths 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
c03d372c54 .github/ci: Run image reports job after vms job
It shows changes also in OEM images and these are built in vms step.
2023-11-21 16:00:00 +01:00
Krzesimir Nowak
202b905a47 .github/ci: Fix clobbering of parameters and env vars 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
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
Thilo Fromm
bd54e3a0ce .github: removed torcx artifact handling from github CI
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-10-23 16:05:45 +02:00
Krzesimir Nowak
876436f34b ci-automation/image-changes: Work around show-changes issue
There's a bug in show-changes script where it defaults to values with
single quotes in them. So the default scripts directory is not
"scripts" but "'scripts'". This will be fixed in show-scripts, but for
now work it around here by explicitly defining the directories.
2023-09-29 13:49:46 +02:00
Kai Lueke
ddb808f5c5 GitHub Actions: Use correct version in kola run and skip update test
The kola run didn't pick up the version that was set up in the build
because the git changes from that step are lost.
Redo the version setup in the kola run to use the same version, and
skip the kola update test if no update payload can be found. In the
future we should copy it over from the GitHub Action artifact.
2023-09-08 14:50:43 +02:00
Krzesimir Nowak
9d59847040 .github: Add image changes reports 2023-08-07 14:05:14 +02:00
Jeremi Piotrowski
552de1c413 .github: Install zstd as part of setup
Zstd is now used for container images compression so make sure it is part of
our runners.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-06-29 10:01:39 +02:00
Gabriel Adrian Samfira
6819fd1a9e
Properly reference inputs
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-01 19:18:23 +03:00
Gabriel Adrian Samfira
3a0a28e32a
Make jobs cancelable
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-01 18:39:14 +03:00
Gabriel Adrian Samfira
215fb8f823
Refactor workflows
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-31 15:17:32 +03:00
Gabriel Adrian Samfira
0513a6e82c
enable on PR
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-31 14:56:33 +03:00
Thilo Fromm
0e8cde89fe pr-comment-build-dispatcher.yaml: dispatch SDK and OS image builds
This change updates dispatching of SDK and OS image builds from changes
to a PR to an explicit comment. PRs will only be built if that comment
was added by a member of the Flatcar maintainers team.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-05-09 17:29:31 +02:00
Thilo Fromm
d92589280b workflows: add update-sdk.yaml
This change adds a github actions workflow to build a new SDK container
based on an existing SDK container. This can be used for CI testing
intrusive changes that also affect the SDK without bootstrapping a whole
new SDK.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-05-09 12:13:06 +02:00
Dongsu Park
425473f11d .github: add back ready_for_review
In case of a draft PR created first, no CI gets triggered at the time.
So we should trigger CI afterwards when it is being set to a
ready_for_review state.
2023-05-03 17:37:37 +02:00
Dongsu Park
bbc3ae71dd .github: get build and CI triggered by opened, synchronize
Build and CI tests should run automatically whenever a pull request is
opened, reopened or updated. On the other hand, it is not necessary to
run build and CI tests on the events ready_for_review and
review_requested.
2023-04-26 17:35:09 +02:00
Thilo Fromm
401af830d1 scripts, CI, workflows: remove submodule handling (main) 2023-04-13 12:26:36 +02:00
Thilo Fromm
f07cb5f781 tapfile_helper ff.: support TAP and Markdown output
This change adds markdown output support to tapfile helper.
tap_generate_report() has been refactored to use low-level output
functions to write tests; TAP and markdown output is supported and both
are generated by default. Also, it should be straightforward to add
other output formats by implementing the respective low level print
functions.

The markdown output is now used by run-kola-tests.yaml to generate step
output and, if run from a PR, add a comment with test results to the PR.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-03-29 21:05:47 +02:00
Thilo Fromm
3653c9a8e5 [ci,run-kola-tests].yaml: use HEAD commit ref for PR builds
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-03-28 16:22:14 +02:00
Thilo Fromm
43bbabec4b ci.yaml: extract + upload build logs also on failure
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-03-28 10:02:17 +02:00
Thilo Fromm
54c61a046b ci.yaml: run only when ready and / or review requested 2023-03-28 10:02:17 +02:00
Thilo Fromm
28b26c87c1 ci.yaml: re-use build container, finer grained artifact upload
This change removes "docker commit" at the end of each step and instead
makes build steps re-use the build container, saving some build time.

It also makes artifact upload more granular, so build logs, images, and
dev container can be downloaded individually.

Lastly, it exports torcx tarball and binary packages as a separate
artifact each, for successive re-use in the kola tests.
2023-03-28 10:02:17 +02:00
Kai Lueke
71510fb117 .github: Specify remote when checking out c-o/p-s ref in workflow
When the specified remote contains a same-named branch as origin,
the checkout fails with "fatal: 'X' matched multiple (Y) remote
tracking branches".
Add the remote name as prefix to make the reference unambiguous.
2022-07-18 20:12:06 +02:00
Gabriel Adrian Samfira
340fd39a9f
Update kola test workflow
* arm64 tests now run in LXD containers instead of VMs
  * parallelism increased for arm64
  * some setup steps are skipped on arm64

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-07-13 14:20:12 +03:00
Gabriel Adrian Samfira
6eabd91a04
Remove customizations for now
Remove arch and parallel options. Hardcode them for now.
2022-07-12 02:48:42 +03:00
Gabriel Adrian Samfira
879e5a2b30
Make the kola test workflow reusable
* Adds a reusable workflow that can run tests
  * Adapts the ci.yaml to use reusable workflow
  * Creates a new workflow that helps trigger tests using an arbitrary
    workflow run.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-07-11 16:23:35 +03:00
Mathieu Tortuyaux
f9b13baeb5
.github/ci: add kola qemu test
this initial attempt runs right after the "packages" jobs and downloads
the resulting artifacts.

The QEMU image is unzipped then the kola test is running using the
ci-automation scripts.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-07-07 10:01:49 +02:00
Gabriel Adrian Samfira
59e7b31778
Add concurency setting to CI workflow
This change will prompt the CI workflow to cancel a currently running
job, if a new push is sent in a PR. This should prevent duplicate jobs
running for the same PR simultaneously.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-07-04 21:18:31 +03:00
Kai Lueke
37253cd499 .github: Run CI workflow only for PR events
Building for the branch push event causes two builds per PR and is not
needed anyway (we have nightly builds for the main branch).
Only consider PR events to trigger the CI build.
2022-06-28 11:19:13 +02:00
Gabriel Adrian Samfira
6e03ea1821 Add CI workflow 2022-06-24 15:35:23 +00:00