Commit Graph

279 Commits

Author SHA1 Message Date
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
Krzesimir Nowak
a0b195f876 ci-automation: Allow using --devcontainer-file option too
I seem to have problems with getting a network connectivity inside
QEMU vm when running the tests in the azure machine. I don't know
what's the cause, but for the dev container tests these problems can
be worked around by using the locally provided dev container
image. Make it possible by specifying QEMU_DEVCONTAINER_FILE in the
environment.
2023-05-30 15:59:37 +02:00
Thilo Fromm
4ffc9b254f garbage_collect_github_ci_sdk: add keep_tail, clean up keep var usage
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-05-22 12:21:07 +02:00
Thilo Fromm
83a85683c8
Apply suggestions from code review
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2023-05-22 12:14:04 +02:00
Thilo Fromm
9b3a67e72b ci-automation/garbage_collect: Add github CI SDK builds
This change adds a garbage collector script for SDK containers built via
Github actions CI automation
https://github.com/flatcar/scripts/blob/main/.github/workflows/update-sdk.yaml
These SDK container builds do not create a version tag in the scripts
repo. The garbage collector therefore retrieves versions from a
directory listing of
https://bincache.flatcar-linux.net/containers/ .

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-05-09 17:29:38 +02:00
Thilo Fromm
177f8854cc
Merge pull request #774 from flatcar/t-lo/test-markdown-fix-foldable-details
tapfile_helper: fix foldable details output
2023-05-03 18:06:46 +02:00
Thilo Fromm
d66ab2b2c3 tapfile_helper: fix foldable details output
This change adds a "<summary>" sub-block to the "<details>" block in
markdown test reports.

The test run details output, which is used to print debug and error
messages of test runs in case of test failures, was meant to be
fold-able, aiding readability of test reports. This is implemented using
the "<details>" feature. However, we forgot to mark a "<summary>" line
within the "<details>" block, leading to the blocks not being fold-able
but instead being visible all the time.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2023-05-03 10:57:02 +02:00
Krzesimir Nowak
66e72c79a0 ci-automation: Properly escape parameters passed to bash
Forwarding parameters to another bash invocation through a string
interpreted as a bash script is a bit troublesome. It is not enough to
wrap a parameter like 'foo bar' in escaped double quotes (\") to avoid
it being split into two parameters by bash executing the script
string. It mostly works, but there's always a risk of having a path
where this breaks. It's rare

Wrapping into escaped quotes, be them double or single, also won't
work for passing an array of parameters, so it's even easier here to
trigger globbing or bracket expansion or another unwanted splitting of
supposedly one parameter into multiple. Globbing can be temporarily
disabled with 'set -f' or 'set -o noglob', but this still leaves all
the other special bash characters unescaped. So each parameter in the
array should be escaped before they are put into the script string.

The escaping can be done with `printf` and its '%q` formatter, so
let's do so. For single parameters it is as simple as
`foo_escaped=$(printf '%q' "${foo}")`, for arrays a loop needs to be
used.
2023-04-27 12:55:00 +02:00
Krzesimir Nowak
0b83fbf127 sdk_bootstrap: Push a branch also for two-phase SDK nightly builds
The two-phase nightly builds create an intermediate tag first, which
didn't match the main nightly tag regexp before. Because of that, the
commit was not pushed to the main branch. The following final SDK
build had a version that matched the regexp, but the last commit (with
the intermediate tag on it) wasn't in main, and thus was also not
pushed.
2023-04-24 14:41:22 +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
27d540692f run-kola-tests.yaml: use new artifacts, local web server
This change updates the github actions kola test runner workflow to use
the new, separated artifacts produced by ci.yaml.

Further, it adds a fix for the devcontainer tests. Devcontainer and bin
packages used in the devcontainer tests are now served from a local
temporary web server.

The change also adds the qemu_update test and provides the respective
update payload.

Lastly, the tests now use a local torcx_manifest.json produced by
ci.yaml, which points to a torcx tarball also served by the local
temporary web server.
2023-03-28 10:02:17 +02:00
Kai Lueke
d53d415ef8 Run kola without --qemu-skip-mangle on Jenkins
For the GitHub CI we have to use --qemu-skip-mangle because the LXC
containers don't have access to loop devices. Running with
--qemu-skip-mangle means that the serial console does not get captured
completely because systemd and dracut messages are missing, and thus we
don't catch these errors in kola.
Make the skipping conditional and use it in Jenkins at least for the
nightlies and releases.
2023-03-24 22:17:13 +09:00
Kai Lueke
87e13eb3de ci-automation: Allow git to work on directory owned by other user
The get_git_channel function failed to work which resulted in the
Alpha release job skipping the AWS publishing for the Alpha channel
because it defaulted to the developer channel as fallback when git
rejected to work on the directory owned by the build user while running
as root user. A new version of git caused this behavior change and also
prints an error message that explains to have to set safe.directory.

Set the git config entry safe.directory for the /work path when
entering the mantle container where git runs as root while working on
the directory owned by the build user.
2023-02-14 11:39:33 +09:00
Krzesimir Nowak
50183b48b8 ci-automation: Get two files to build vms instead of a whole directory
Getting the contents of the directory in the buildcache involves using
rsync with some ssh invocation to log in as a bincache user. It's not
a thing that will work locally unless the user gets ahold of the SSH
key allowing the user to log in to buildcache as a bincache user.

Replace it by downloading two files that are actually needed for
building vms: an image file and the version file. This just uses curl
and is accessible for everyone.
2023-02-08 14:50:36 +01:00
Krzesimir Nowak
46a250bf33 ci-automation: Report file size changes
This uses the new size-change-report.sh script to print out some
information about largest files being added/removed and files with
greatest increase/decrease in file size between two versions of the
image.
2023-02-02 10:05:02 +01:00
Krzesimir Nowak
219326392c ci-automation: Try reporting the changes in initrd too
This relies on flatcar_production_image_initrd_contents.txt being
uploaded to the server. It also exports the WITHWTD environment
variable with a value 1, which will make the package-diff script to
try out the wtd contents file variant first.
2023-02-02 10:04:40 +01:00
Mathieu Tortuyaux
b8cafc1b9f
gc: pass OPENSTACK_CREDS to mantle container
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-01-03 09:24:16 +01:00
Kai Lueke
bc3a9aeacd qemu_update: Add update test from an old release
To ensure that we can update from very old releases, add a test with a
fixed old release, here the Stable release that introduced arm64
support to have the same test logic for both architectures.
2022-11-29 16:51:27 +01:00
Krzesimir Nowak
fbb962c7f6 ci-automation: Add an environment variable to skip build shortcuts
This will be used for the "run all tests" days in Jenkins.
2022-11-03 12:00:10 +01:00
Kai Lueke
3cb9736c33 ci-automation: Use plain AMI image for uploads
Recently we ran into sporadic corruption issues for AWS EC2 AMIs.
We use the streamOptimized VMDK format and it seems to cause problems
at the AWS side, regardless if created by qemu-img or vmdk-convert.
Switch to using the plain AMI images for uploading as workaround.
2022-10-28 17:21:39 +02:00
Kai Lueke
25dbccc14d ci-automation: Support local patches
For embargoed releases it is useful to apply patches locally to build
with them before they are public. This allows to push the same patches
to the repo during the Flatcar release at the embargo lift. The result
is the same (as long as the scripts patches did not change parts of the
setup logic that was running before they got applied), we can just build
earlier and thus do the Flatcar release directly on the embargo lift
instead of having to wait with the build because it would require the
patches to be in the repos.
2022-10-27 11:53:33 +02:00
Krzesimir Nowak
06d2aabaa2 ci-automation/vendor-testing/vmware.sh: Fix unbound variable use
This gets triggered when the test is rerun and an existing image is
reused.
2022-10-11 15:25:56 +02:00
Jeremi Piotrowski
de132c62d5
Merge pull request #521 from flatcar/jepio/gpg-import-batch
ci-automation: use --batch when importing gpg key
2022-10-06 09:52:07 +02:00
Kai Lueke
00223be1c7 ci-automation/release: Only upload SDK if a new one was built
A release includes an SDK if its SDK version is the release version.
Only then we need to upload a new SDK container image.
2022-10-04 14:24:28 +02:00
Jeremi Piotrowski
6e11ae3394 ci-automation: use --batch when importing gpg key
All invocations of gpg in ci-automation pass --batch as an argument except the
import. Be consistent by having it included everywhere. Additionally, since
ci-automation runs wrapped in a systemd service, no tty is available so batch
is needed for correctness.
2022-10-04 10:22:43 +02:00
Mathieu Tortuyaux
289cc52c5f
automation/gc: add openstack garbage collector
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-09-29 11:21:25 +02:00
Mathieu Tortuyaux
de8b4eae6a
ci-automation: add openstack to tested vendors
Missing link to enable the tests in the Flatcar test suite.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-09-29 11:21:25 +02:00
Kai Lueke
89495373d9 ci-automation: Ensure to use latest container image
The container image was only created if it didn't exist locally. This
would result in fixes not being in a downstream job that is scheduled
to a different worker node on Jenkins that has a stale copy.
For the build automation we will now always download the latest
container tar ball based on comparing the image ID from a new artifact,
and for registry images we pull the container image to make sure that
we don't use a stale copy when we rebuild.
2022-09-29 10:04:23 +02:00
Kai Lüke
dca21df916
Merge pull request #513 from flatcar/kai/container-fallback
ci-automation: Fallback also to the mirror for container download
2022-09-27 17:49:53 +02:00
Kai Lueke
20643b260e ci-automation: Fallback also to the mirror for container download
When there is no SDK container image in the registry, the fallback
looks at bincache but bincache isn't backed up and may be cleaned of
old releases. While this won't be the regular case, the container
image registry may be unavailable (or renamed as happened now), or
people would like to rerun the image job which relies on the packages
container.
2022-09-27 15:53:33 +02:00
Krzesimir Nowak
24213a5c96 ci-automation: Download correct previous image for LTS release
qemu_update vendor test was downloading a wrong LTS image when it was
testing the old LTS image. This is because it was using a current
symlink, which for LTS channel will always point to the new LTS. Old
LTS is available under current-${YEAR} symlink. We can get the
information about year from the lts-info file.
2022-09-27 11:56:39 +02:00
Krzesimir Nowak
2606380396 ci-automation: Fix unbound variable errors
FLATCAR_VERSION and FLATCAR_SDK_VERSION are defined in the version
file, so it should be sourced before trying to use those. Here we try
to do it in a limited scope.

Also, SDK container link should use the dockerized version in a
directory name.
2022-09-27 10:55:08 +02:00
Kai Lueke
326c645647 ci-automation: Fix syntax error 2022-09-26 17:24:53 +02:00
Kai Lueke
bca6e6e41d ci-automation: Don't skip nightly build when the previous one failed
Currently we skip the nightly build if there are no changes. This
didn't work well because a new run doesn't fix any failure because the
rerun became a no-op.
Check if the main artifacts we expect from a step are found, as simple
heuristic on whether a rerun is needed.
2022-09-26 17:06:21 +02:00
Kai Lueke
18627499c1 Annotate a copied function
I found a duplicate function and verified that it's the only one via
comm -12 <(sort ci-automation/ci_automation_common.sh) <(sort sdk_lib/sdk_container_common.sh) | grep function
I'm not sure if this is due to a case where we only import one but
can't import the other, hence I'm not deleting it now.
2022-09-26 15:39:45 +02:00
Kai Lueke
3fef1eb801 ci-automation/release: Set up secret envs 2022-09-22 18:31:50 +02:00
Kai Lueke
ffee812d32 ci-automation/release: Run plume release only once
We need to run plume only once for each arch, move it out of the loop.
Also, address some smaller things that shellcheck complains about.
2022-09-22 18:31:50 +02:00
Kai Lueke
79d89faf91 ci-automation/secret_to_file: Fix usage from subshell
This failed when used from ( secret_to_file ... VAR ; cat $VAR )
because ( ) starts a new subshell PID and secret_to_file's returned
/proc/PID/fd/X path was then using the wrong PID.
2022-09-22 18:31:50 +02:00
Kai Lueke
ef8f20f9dd ci-automation/release: Disable GCS auth for plume pre-release
When GCS auth is expected, plume would upload the AMI list to GCS.
2022-09-22 18:31:50 +02:00
Mathieu Tortuyaux
593cf19a7a release: get product IDs from Jenkins
the JSON object is passed from the Groovy script to the release script,
we just need to extract the correct AWS Marketplace product ID based on
the "<channel>-<arch>".

Exception for the stable-amd64 where we also need to get the stable-pro
product ID.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-09-22 18:31:50 +02:00
Mathieu Tortuyaux
27b62deb81 sdk_container: publish the SDK on a Docker registry
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-09-22 18:31:50 +02:00
Kai Lueke
20ed1ad3a4 ci-automation/release.sh: Run plume to release cloud images
The mantle plume tool has two steps, pre-release is the mere upload and
release is the publication. In the past this was used to run the tests
inbetween but we don't do this anymore.
Run plume pre-release and release in a single job. Since plume can't
push to GCS in our case, we upload the files to bincache. Also do the
cloudformation update which was previously done in
flatcar-build-scripts but could only be run after the sync to Origin.
It requires the "aws" tool in the mantle container until we implement
this in plume directly.
2022-09-22 18:31:48 +02:00
Krzesimir Nowak
1585ede78a ci-automation: Implement a stricter image version check
I made a mistake and wrote a version like main-3363-0.0-stuff (note a
dash instead of a dot after the first number). Surprisingly the build
chugged along just fine almost until the end of the image job - it
detected invalid version string when the job wanted to create a
version.txt file:

ERROR   build_image: script called: build_image '--board=amd64-usr' '--group=developer' '--output_root=/home/sdk/build/images' '--only_store_compressed' '--torcx_root=/home/sdk/build/torcx' 'prodtar' 'container'
ERROR   build_image: Backtrace:  (most recent call is last)
ERROR   build_image:   file build_image, line 196, called: split_ver '3363' 'SPLIT'
ERROR   build_image:   file common.sh, line 192, called: die 'Invalid version string '3363''
ERROR   build_image:
ERROR   build_image: Error was:
ERROR   build_image:   Invalid version string '3363'

Let's have a stricter version check in the beginning of the build
process, so the process fails sooner rather than later.
2022-09-19 12:12:37 +02:00
Kai Lueke
91a26e5e1e Use new github org name "flatcar"
The "flatcar-linux" github org was renamed to "flatcar". There are no
github redirections in place and we have to update all links.
2022-09-14 14:33:27 +02:00
Kai Lueke
edba76c012 Use ghcr.io/flatcar, there are no redirects
The GitHub org rename also moved the ghcr.io container image repo but
in contrast to git repos, there are no redirects!
2022-09-14 14:33:24 +02:00
Krzesimir Nowak
1ecea3544f ci-automation: Change the way we prepare torcx manifest for testing
Now URLs for torcx packages are always present in the torcx manifest,
but for releases they may be pointing to the origin server where the
packages will be eventually uploaded. At the time of running the
tests, those packages are still only in the build cache, so change the
URLs to point to the build cache, so the test can pass.
2022-09-06 14:00:50 +02:00
Krzesimir Nowak
b2d6f7fc6e *: Allow specifying extra URLs for torcx packages
Torcx manifest may contain paths and URLs as locations of
packages. There are two kinds of packages - vendored and
extra. Vendored packages normally have two locations - path to the
directory inside the image where the package is (which is why it's
called vendored), and a URL to the package on some remote
server. Extra packages only have a URL. But the URLs are added only
when we tell the build_torcx_store script to upload the packages at
the same time, which is what the old build pipeline was doing. With
the new pipeline, the upload happens as a separate step, thus the
upload is disabled when invoking build_torcx_store, and so the
packages are not getting URLs set. This change went unnoticed, because
a kola test checking the generated torcx manifest was only checking if
there is at least one location, either path or URL, and all the new
releases have no extra packages, only vendored ones.

When backporting the new pipeline to old LTS, the kola tests started
to fail, because old LTS had one extra package, and this is how I
noticed the problem.
2022-09-06 14:00:50 +02:00
Kai Lueke
b30654ef22 ci-automation: Prepare release job
The old pipeline had a release job where mantle's plume release tool
was invoked to publish the cloud images.
Implement a release job in the new pipeline with the same goals and
eventually even more automation.
2022-09-05 11:41:41 +02:00
Kai Lueke
1319e4c95a ci-automation: Move image change report to own file
To review the image changes and the changelog more easily and in case
of fixes, iterate over it without rebuilding the image, move this logic
to its own file where a new job could call it.
2022-09-05 11:41:41 +02:00
Kai Lüke
7b7c3e5b76
Merge pull request #425 from flatcar-linux/kai/em-m3
Cover Equinix Metal m3.small.x86 instances in release test
2022-09-01 13:34:20 +02:00
Krzesimir Nowak
8b52a9b04c ci-automation: Use an array for storing failed tests 2022-08-31 09:37:18 +02:00
Krzesimir Nowak
8cd06230ba ci-automation: Print failed tests nicer
Instead of printing failed tests like this:

    Failed tests: kubeadm.v1.25.0.cilium.base
    kubeadm.v1.24.1.cilium.base

Do it like this:

    Failed tests:
    kubeadm.v1.25.0.cilium.base
    kubeadm.v1.24.1.cilium.base
2022-08-31 09:37:18 +02:00
Krzesimir Nowak
9e05a07a77 ci-automation: Return 1 on broken cycle
We have set success to true when the test cycle was broken, which was
a hacky way to avoid printing the give up message. But this setting
success to true also meant that the script returned with status 0,
which is wrong.

Add another variable for controlling printing the give up message.
2022-08-31 09:37:18 +02:00
Krzesimir Nowak
6c77ebde54 ci-automation: Break test cycle properly
Create a tapfile and break out of the loop.
2022-08-31 09:37:18 +02:00
Kai Lueke
b8133d92a0 Cover Equinix Metal m3.small.x86 instances in release test
The new m3.small instance does not have official Flatcar support yet
but we can already cover it in our PXE boot release tests.
The c3.small instances are legacy and m3.small is the new smallest
type.
2022-08-24 18:57:17 +02:00
Krzesimir Nowak
73bb00a9d0 ci-automation: Break retest cycle properly in qemu on arm64
Rerunning the test will always yield the same result in this case, so
it's pointless.
2022-08-24 13:48:35 +02:00