235 Commits

Author SHA1 Message Date
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
Krzesimir Nowak
0c96ff690e
Merge pull request #799 from flatcar/krnowak/more-2-phase-tag-fixes
ci-automation: Follow-up fix for 2-phase nightly SDK build tags
2023-09-29 20:41:26 +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
Krzesimir Nowak
ba79258a4f ci-automation/image-changes: Fix some redirection issues
First issue is that on Jenkins, the beginning of the output seems to
be eaten, leaving us only the final part of the reports. This looks
like an issue stemming from redirecting stdout to stdout with
">/dev/stdout". Special case the stdout by not redirecting anything in
such case.

Second issue is that errors printed by the tools we use for generating
the reports go to stderr, so they don't show in the report. So
redirect their stderr to stdout, so the possible errors are visible in
the report file too. We do not want to redirect the stderr of the
print_image_reports function, because that would also capture
debugging stuff from "set -x" that GitHub Actions are using.
2023-09-29 13:13:22 +02:00
Krzesimir Nowak
3440884205 ci-automation/sdk_bootstrap: Put some names into variables
Changing the name of the main branch and the name of the nightly tag
may be useful for testing, so let's have them defined in one place.
2023-09-28 17:22:09 +02:00
Krzesimir Nowak
71b49c8d43 ci-automation: Follow-up fix for 2-phase nightly SDK build tags
We push a commit with the nightly SDK tag to the main branch if the
SDK was built from the main branch. Which is what happens when we
build the nightly intermediate SDK. The final nightly SDK is not built
from the main branch, but rather from the nightly intermediate SDK
tag. Both of them point to the exactly same commit, but the difference
is in what `git rev-parse --abbrev-ref HEAD` returns for each of
those. When the main branch is checked out, the command will return
"main". When the nightly intermediate SDK tag is checked out, the
command will return "HEAD". So when nightly final SDK is being built,
the command returns a string different than "main" and thus decides
not to push the commit with the final nightly SDK tag to the main
branch. Rework it to assume that if `git rev-parse HEAD` and `git
rev-parse origin/main` return the same commit hash (and it's the
nightly build and all that) then the commit should be pushed.

We use "origin/main" instead of just "main" just in case the main
branch was not checked out before, for some reason (may come up in
testing with different names for the main branch when testing).
2023-09-28 17:22:09 +02:00
krishjainx
2124f63dcb Allow use qcow2 compressed format in place of additional compressed layer 2023-09-12 11:21:08 -04: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
Kai Lueke
995ae2cdbc Support OEM systemd-sysext images and Flatcar extensions
The vendor tools on the OEM partition weren't updated. We now want to
ship them as systemd-sysext images which we can easily update. This
change extends the Flatcar A/B update mechanism to cover the OEM
systemd-sysext images. The same mechanism is also able to support
"official" Flatcar extensions, e.g., a ZFS extension.
2023-09-08 14:50:43 +02:00
Dongsu Park
ab0e58d136
Merge pull request #1057 from flatcar/dongsu/zstd-file-perm
ci-automation: explicitly make packages tarballs readable
2023-08-11 15:39:53 +02:00
Dongsu Park
19e10e72f1 ci-automation: explicitly make packages tarballs readable
Since https://github.com/flatcar/scripts/pull/950 was merged,
tarball files `flatcar-{packages,sdk}-*.tar.zst` have been created
with mode 0600 instead of 0644. As a result, the files with mode 0600
were uploaded to bincache, but afterwards `copy-to-origin.sh` that in
turn runs rsync from bincache to the origin server could not read the
tarballs.

To fix that, it is necessary to chmod from 0600 to 0644 to make it
readable by rsync during the release process.

All of that happens because zstd sets the mode of the output file to
0600 in case of temporary files to avoid race condition.

See also https://github.com/facebook/zstd/pull/1644,
https://github.com/facebook/zstd/pull/3432.
2023-08-11 15:37:44 +02:00
Krzesimir Nowak
93d0e76363 ci-automation: Refactor image changes 2023-08-07 14:05:14 +02:00
Kai Lueke
095ab2392e ci-automation/vms: Export official release variable
The official release variable is used to decide whether a build ID gets
appended to the FLATCAR_VERSION (or VERSION in os-release) or not. It
was set for the image job but not for the vms job, causing the
build_sysext script to get the build ID appended to the FLATCAR_VERSION
which causes a mismatch with the one from the image job.
Set the official release variable in the vms job as well.
2023-07-17 17:27:59 +02:00
Krzesimir Nowak
ec723be9d9 *: Drop unused pkgdb stuff 2023-07-05 08:43:25 +02:00
Krzesimir Nowak
98a5dca8bf ci-automation: Download the sysext base image 2023-07-05 08:40:15 +02:00
Jeremi Piotrowski
862f253518 ci-automation: check for zstd in environment
This replaces pigz, so remove the related variables (PIGZ).

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-06-28 16:43:01 +02:00
Jeremi Piotrowski
c19f0edbff ci-automation: Use zstd to compress container images
We currently use gzip together with pigz (parallel gzip) for importing
container images, and this is a lengthy operation (takes multiple minutes). By
moving to zstd we gain on all fronts: zstd produces smaller files, and is
faster to decompress/compress then pigz while using less resources.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-06-28 16:17:10 +02:00
Jeremi Piotrowski
1fc599f33c ci-automation: Publish torcx_output_root to bincache
`build_image` depends on accesss to the torcx manifest and the "content
addressable nature" of the directory. We currently rely on the torcx output
root structure being preserved in the container image.

While we're moving the torcx output root out of the container image, preserve
its contents so that they can be restored from bincache.
2023-06-27 16:35:30 +02:00
Jeremi Piotrowski
6ebbe5f2b9 ci-automation: Align CONTAINER_*_ROOT with usual location
The SDK container bind mounts __build__/images to the containers image
directory, but the CI uses a different path for images. This causes issues when
building the oem sysext, because it requires mounting an overlayfs. The current
path (~/build/...) is an overlayfs and an ovlerayfs can't be an upper
directory.

Align the CONTAINER_IMAGE_ROOT and CONTAINER_TORCX_ROOT values with standard
practices to that oem sysext building in jenkins ci works.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-06-26 12:33:20 +02:00
Kai Lueke
4653708e82 ci-automation: Add NVIDIA instance type only for amd64
The instance type used for the NVIDIA test is amd64-only.
2023-06-20 12:29:54 +02:00
Sayan Chowdhury
11637c6a6d
Add setup to run the GPU tests on Azure
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2023-06-16 13:04:09 +05:30
Krzesimir Nowak
df6e2aa505 ci-automation: Download portage database from bincache for vms 2023-06-06 13:01:09 +02:00