Commit Graph

279 Commits

Author SHA1 Message Date
Krzesimir Nowak
b6bb07acdc ci-automation: Initial test script for Digital Ocean 2022-05-06 09:16:23 +02:00
Krzesimir Nowak
d26f2b3b39 ci-automation: Use vendor_test.sh in equinix_metal and gce tests 2022-05-05 13:07:52 +02:00
Krzesimir Nowak
1d6f38a72e ci-automation: Reduce boilerplate in vendor tests
Move the common setup to the vendor_test.sh script, which will be
sourced by the vendor scripts.
2022-05-05 12:57:14 +02:00
Kai Lueke
f7edd4e061 ci-automation: add GCE image test
The GCE image test runs on a single instance type for now. In the
future it would be good to test the new NIC type with the cl.internet
test.
2022-05-05 16:52:42 +09:00
Mathieu Tortuyaux
550e702f90 ci-container/test: add equinix-metal test script
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2022-05-04 16:34:37 +09:00
Kai Lüke
28ee2a3256
Merge pull request #298 from flatcar-linux/kai/test-lts
CI: Support comparing to current LTS and updating from it
2022-04-29 16:34:47 +09:00
Mathieu Tortuyaux
4bd316ac74
Merge pull request #272 from flatcar-linux/tormath1/pxe
ci-automation/vm: build PXE if Equinix Metal is built
2022-04-28 11:52:52 +02:00
Kai Lueke
9a98cc2917 ci-automation/vms: handle platform names and generate the image formats
The kola test scripts are named by the platforms. The image naming is
also quite difficult to know and remember, e.g., whether "ami" or
"ami_vmdk" is needed for AWS tests and whether it's "vmware" or
"vmware_ova".

To address these problems the vms build stage now accepts the platform
names as format input, and for each platform it will automatically
generate the needed image types to run the tests.
2022-04-28 17:15:02 +09:00
Kai Lueke
c4af762e26 ci-automation/garbage_collect: clean up kola cloud resources
The garbage collect job should also clean up kola resources if a test
job failed to do so due to forced terminator or misbehavior. The
cleanup is done by "ore" which needs credentials like kola.

Run ore from the mantle container image. Unfortunately Docker does not
support Podman's --env-host option and the env vars had to be passed
explicitly. While --env-file=<(env) would work it contains a lot of
variables that cause the container to behave a bit weird.
2022-04-28 16:27:14 +09:00
Kai Lueke
856929d357 CI: Support comparing to current LTS and updating from it
When the restriction that the CI can't access the LTS release is gone
we can support to run the image comparison and the kola update test.
2022-04-26 15:00:31 +09:00
Krzesimir Nowak
1916936e34 ci-automation: Update test.sh script docs
We are not using SDK container for running the tests any more - it was
replaced with mantle container. Update the docs accordingly.
2022-04-20 16:34:07 +02:00
Mathieu Tortuyaux
19ca42b3dd
ci-automation/vm: build PXE if Equinix Metal is built
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2022-04-20 16:33:00 +02:00
Kai Lueke
98e9947a06 ci-automation: silence rsync
The rsync copy logs made it hard to navigate the job output.
Remove the --progress and -v flags.
2022-04-20 19:13:02 +09:00
Kai Lueke
da0380c7e8 Run CI container pipeline kola tests with the new mantle image
The SDK container does not exist for arm64 and is quite heavy. We
currently also resort to a unconditional rebuilding of mantle inside
the SDK.
Use the new mantle container image to run kola tests, and pin its
version through a text file that gets updated by GitHub Actions.
2022-04-20 19:13:02 +09:00
Mathieu Tortuyaux
de7e05403b
ci-automation/vms: rename equinix_metal to packet
this is required to keep "packet" in the SDK linguo while the user can
use "equinix_metal" term.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2022-04-13 13:09:51 +02:00
Kai Lüke
7376494ef2
Merge pull request #266 from flatcar-linux/kai/sdk-from-release-tag
ci-automation: use a single git tag and skip nightlies with no changes
2022-04-04 17:12:36 +02:00
Kai Lueke
bd970357c8 ci-automation: use a single git tag and skip nightlies with no changes
The pipeline created two tags if an SDK was built, one for the SDK and
one for the OS build (which was a free-standing tag or a local state
that was equivalent to the existing tag of the same name). The
nightlies created update commits on the main branch, even if no change
was done, and on the release branches we lacked these commits.

Create the release tag in the nightly SDK bootstrap already and reuse
it for the nightly OS build. Instead of local state, checkout the
existing tags explicitly. Extend the nightly update commit logic to
cover release branches and detect if we can skip building because no
changes were done.
2022-04-01 17:18:51 +02:00
Thilo Fromm
6dcfd9aeb6 ci-automation/test.sh: remove PARALLEL_TEST passing (move to CI)
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-04-01 13:59:47 +02:00
Thilo Fromm
1e0dc777fe ci-automation/test.sh: export PARALLEL_TESTS
Export PARALLEL_TESTS in the container's .env file to ensure it is
passed to the vendor script.
2022-03-23 12:11:12 +01:00
Thilo Fromm
9b83d3e80b
Merge pull request #258 from flatcar-linux/t-lo/ci-automation-tests-use-latest-kola
ci-automation/test.sh: use the latest kola from coreos-overlay
2022-03-16 17:04:16 +01:00
Kai Lueke
c149d24ced run_sdk_container: Fall back to tar ball download for SDK image
The nightly SDK image is not pushed to a registry but has to be
downloaded from the build server as tar ball.
Fall back to the tar ball import for a better user experience.
To reuse the ci logic it had to support the "docker" env variable.
The use of the pigz container is not always needed if the user has
pigz available.
2022-03-16 15:31:03 +01:00
Thilo Fromm
6286b0a442 ci-automation/test.sh: use the latest kola from coreos-overlay 2022-03-16 14:14:46 +01:00
Thilo Fromm
a9700e16fb ci-automation/tapfile_helper_lib.sh: remove non-printable ASCII
Jenkins TAP file parser does not process non-printable ASCII characters
but bails out. This change removes all ASCII < 0x1F, so non-printable
characters are not included in the TAP report.

Fixes
    Caused by: unacceptable character '' (0x1B) special characters are not allowed
2022-03-16 09:37:48 +01:00
Thilo Fromm
53c90388c0 ci-automation/vendor-testing/qemu_update.sh: fix unbound
One-line fix to resolve
    ci-automation/vendor-testing/qemu_update.sh: line 64: testscript: unbound variable
error.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-03-15 17:39:28 +01:00
Kai Lüke
d3aa4f1331
Merge pull request #247 from flatcar-linux/kai/set-official
ci-automation: set images as official based on version
2022-03-10 12:41:10 +01:00
Thilo Fromm
b6caa4163d
Merge pull request #246 from flatcar-linux/t-lo/ci-automation-tests-pass-parallel-env-to-container
automation/test.sh: pass PARALLEL_TESTS to container
2022-03-10 12:24:55 +01:00
Kai Lüke
fff05f00c5
Merge pull request #245 from flatcar-linux/kai/sdk-tests
ci-automation: print kola command line
2022-03-10 12:06:07 +01:00
Thilo Fromm
194c503b56
Merge pull request #249 from flatcar-linux/t-lo/ci-automation-tapfile-ascii
ci-automation/tapfile_helper_lib.sh: only ASCII chars
2022-03-10 11:34:04 +01:00
Thilo Fromm
aa6a742efa ci-automation/tapfile_helper_lib.sh: only ASCII chars
This change removes all non-ASCII characters from test debug / error
output when ingesting the output for inclusion in the TAP report.
Jenkins TAP parser does not handle some unicode chars, leading to tap
parser errors with e.g. Cilium output (which uses unicode).

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-03-10 10:20:11 +01:00
Jeremi Piotrowski
25cf7c4fc5 ci-automation/tapfile_helper_lib: fix commiting last transaction
Move the final db commit to inside the subshell. Since the while loop
runs inside a subshell, the SQL variable outside of the subshell is not
modified, and so the last contents of the SQL variable are dropped. This
shows up when the last couple test cases don't have an error message,
and simply append the transaction to 'SQL'. They are never written to
the db.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2022-03-10 09:14:42 +01:00
Thilo Fromm
d266229434
ci-automation/test.sh: handle unset PARALLEL_TESTS
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2022-03-10 08:24:44 +01:00
Kai Lueke
c3ae1ce3b0 ci-automation: set images as official based on version
The image needs to be set into official mode through a helper script
(see jenkins/images.sh) and the COREOS_OFFICIAL variable needs to be
set for prod_image_util.sh/build_image_util.sh/grub_install.sh.
2022-03-09 18:19:52 +01:00
Thilo Fromm
8ca2393eb8 automation/test.sh: pass PARALLEL_TESTS to container
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-03-09 17:38:15 +01:00
Kai Lueke
79e07bca44 ci-automation: print kola command line
For running kola manually and knowing which parameters where set, it
helps to print the kola command line in the job.
2022-03-09 16:44:06 +01:00
Kai Lüke
0cc95e3b3e
Merge pull request #244 from flatcar-linux/kai/set-group
Fix and improve channel handling
2022-03-04 14:22:10 +01:00
Kai Lueke
db7220eced ci-automation: set the channel from the git tag
For now we had only "developer" images in the new pipeline.
Based on the git tag like "alpha-1234.0.0" set the channel (group) for
the image and also use this logic when finding the channel in the QEMU
update test.
2022-03-04 13:49:18 +01:00
Thilo Fromm
eba1cdb4c2 ci-automation/tapfile_helper_lib.sh: fix CI TAP parse errors
This change fixes and adds more string chars escaping in the test error
debug output ("\" are removed and a bug in removing '"' is fixed),
addressing a parser errof the CI encountered when ingesting TAP output.

Furthermore, line numbering is shortened, and test names have a spurious
"-" prefix removed.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-03-03 16:29:38 +01:00
Thilo Fromm
2b2bfad5e1 ci-automation/tapfile_helper_lib.sh: use subshell, break lines after 200
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-03-02 15:35:57 +01:00
Thilo Fromm
22af2876e6 ci-automation/tapfile_helper_lib.sh: read test output from file
This change updates the tapfile helper to read test output from a file
instead of passig it inline in the SQL INSERT statement.
This fixes an issue with large error output from tests, which breaks
tap_ingest_tapfile():
    ci-automation/tapfile_helper_lib.sh: line 31: /usr/bin/sqlite3: Argument list too long
Error observed with the cl.toolbox.dnf-install test, which can generate
8000 lines of output. Fix tested with the same output.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-03-02 13:02:52 +01:00
Kai Lüke
ef9914e06e
Merge pull request #235 from flatcar-linux/kai/add-update-test
ci-automation: add update test
2022-03-02 11:27:43 +01:00
Thilo Fromm
b72586c4de
Merge pull request #236 from flatcar-linux/t-lo/tool-for-fetching-build-stage-images
ci-automation/util/fetch_image.sh: fetch CI build stage image
2022-03-02 10:10:17 +01:00
Thilo Fromm
637e5d52ec
Apply suggestions of my favourite proofreader
Krzesimir continues to save me from embarrassing spelling mistakes 💙

Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2022-03-02 10:09:59 +01:00
Kai Lueke
a9c3a31efb ci-automation: add missing update test
The kola update test was missing. It is performed as update from the
old image to the newly built payload to ensure that the new image is
compatible for old clients.
2022-02-28 15:59:17 +01:00
Thilo Fromm
88a4df98b1
Merge pull request #239 from flatcar-linux/t-lo/ci-automation-add-qemu-uefi-test
ci-automation/vendor-testing: add qemu_uefi
2022-02-25 12:15:01 +01:00
Thilo Fromm
1b4022d237
Merge pull request #237 from flatcar-linux/t-lo/container-builds-update-version-in-main-branch
ci-automation: SDK build updates version.txt in main branch
2022-02-25 12:14:24 +01:00
Thilo Fromm
9afab3aac4 ci-automation/vendor-testing: add qemu_uefi
This change adds the qemu_uefi.sh vendor test. It reuses most of the
implementation in qemu.sh (qemu_uefi.sh is a soft-link to qemu.sh).

This also enables qemu testing for ARM64.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-24 13:54:58 +01:00
Thilo Fromm
308a2a2ab6 ci-automation/sdk_bootstrap: check submodules for nightly branch push
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-24 12:06:28 +01:00
Thilo Fromm
82da911c27 ci-automation/sdk_bootstrap: Only push to main in nightlies
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-24 11:02:34 +01:00
Thilo Fromm
39b65765b4 ci-automation: fix test_update_reruns typo
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-24 10:11:38 +01:00
Thilo Fromm
7cadae957a ci-automation: SDK build updates version.txt in main branch
This change has sdk_bootstrap update the origin branch when run from the
main branch, updating the SDK and OS version in 'main' for each SDK
bootstrap build.

Release / maintenance branches have the SDK version set in the
versionfile at release time. But main is never updated.

Updating the versionfile in main when a new SDK is built ensures that
dev branches based on main will also use the correct SDK version (e.g.
in subsequent CI builds).
2022-02-23 20:41:57 +01:00
Thilo Fromm
248ffcef03 ci-automation/util/fetch_image.sh: fetch CI build stage image
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-23 19:25:12 +01:00
Thilo Fromm
e92521c166 ci-automation/test*: per-image summary, honor parallel
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-23 11:30:54 +01:00
Thilo Fromm
3253435d6c ci-automation/test.sh: publish to _kola_tmp, not debug/_kola_tmp
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-22 18:27:36 +01:00
Thilo Fromm
3397167b5e
Update ci-automation/test.sh: fix typo.
Co-authored-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2022-02-22 18:13:15 +01:00
Thilo Fromm
8157bf0302 ci-automation: publish test results, add to GC
This change adds copying test results to the build cache server, and
adds respective deletion to the garbage collector.

Also, the patch fixes an issue with torcx publishing (manifest
publishing had arch hard-coded).

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-22 16:22:57 +01:00
Thilo Fromm
081df6cd2c ci-automtion/packages.sh: fix torcx URL, add manifest
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-22 15:44:04 +01:00
Thilo Fromm
4f39e0112f ci-automation/tests.sh: use http in torcx manifest
Use HTTP instead of https because Ignition does not recognise
letsencrypt certificates, leading to test breakage in
docker.torcx-manifest-pkgs.

Add a note in settings.env to explicitly call out HTTP requirement of
build cache server.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-21 17:23:53 +01:00
Thilo Fromm
0fa985b872 ci-automation/test.sh: stage torcx manifest
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-21 16:30:30 +01:00
Thilo Fromm
1045fd5ac8 ci-automation/README.md: add docs for qemu test 2022-02-21 13:57:11 +01:00
Thilo Fromm
bee5ac7f74 ci-automation/tapfile: enforce foreign keys, simplify 2022-02-21 12:56:45 +01:00
Thilo Fromm
cafa385164 ci-automation: publish torcx json and use in tests
This change updates the package build script to publish the torcx
manifest file to the build cache so it can be used by tests.
It also updates the generic test script to use the SDK container instead
of the packages container image, and to download and use the torcx
manifest from the build cache.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-18 15:52:47 +01:00
Thilo Fromm
a5b958fd07 ci-automation/test.sh: fix reruns, set retry to 20
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-18 14:40:18 +01:00
Thilo Fromm
95ef0b7322 ci-automation: git author and curl verboseness
- Git author configuration moves to tagging function and put under a
  condition so as to not pollute peoples' workspaces.
- curl now less verbose since it was spamming logs with TLS debug
  information.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-17 12:31:07 +01:00
Thilo Fromm
3a416fbf32 ci-automation testing: address PR review comments
- add cleanup script to test.sh
- remove wrapper function from qemu test

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-17 12:30:36 +01:00
Thilo Fromm
6c76bfa1cd
ci-automation/tapfile_helper_lib.sh: add @pothos' retcode fix
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2022-02-17 10:45:10 +01:00
Thilo Fromm
5bfe2f395c
Apply @pothos' suggestions from code review
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2022-02-17 10:29:05 +01:00
Thilo Fromm
f6f44e2ca8 ci-automation: first stab at adding testing
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-16 19:59:45 +01:00
flatcar-ci
0bbae51a5e settings / ci-automation: remove "binpkg" prefix
The original intention of the "binpkg" prefix in the CI binary package
cache URL was to separate packages from other build artifacts like
containers, images, and SDK tarballs. Motivation was to separate
developer content (binary packages) from CI automation artifacts
(everything else); since binary packages are not used by the CI.

This broke assumptions in scripts which use the binary host URL for
other things than packages - e.g. SDK tarballs or images. These
scripts would get a bincache URL with "binpkg/" prepended, while CI
automation would *not* use that prefix.

This change removes the use of "binpkg/" altogether since it would not
work as intended without more significant changes to build scripts.
2022-01-11 09:56:21 +01:00
Thilo Fromm
e076931c7d ci-automation/garbage_collect: fix binpkg url
garbage_collect.sh was using 'docker_vernum' where it should have been
using 'vernum' (as push_pkgs.sh does).

Also, make sure release directories are removed, not just packages.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-10 14:07:33 +01:00
Thilo Fromm
a6ddcda88e ci-automation: Apply suggestions from PR review
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2022-01-10 11:41:03 +01:00
Thilo Fromm
0ecd0be77a ci-automation/README.md: pkg publish, bin cache added
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-07 17:47:50 +01:00
flatcar-ci
7d76cfedf7 ci-automation + setup_board: publish and use binpkgs
This change adds a job for publishing binary packages to the build cache
server to the ci automation.

Also, setup_board is updated to use the buildcache package cache if a
nightly build version is detected.

Signed-off-by: flatcar-ci <infra+ci@flatcar-linux.org>
2022-01-07 17:16:44 +01:00
Kai Lueke
e85a16fe1c ci-automation: allow to optionally push and sign the commit
For test builds the commit that updates the submodules can be free-
standing but for releases we need to push it to the branch and also
sign the tag.
Add optional arguments that are used by the tag-release script in
flatcar-build-scripts.
2022-01-05 15:25:31 +01:00
flatcar-ci
b780fd4b19 ci-automation/garbage_collect: remove spurious line number 2021-11-26 17:54:43 +01:00
Thilo Fromm
1d1c6048d4 sdk-container: add @krnowak's suggestions from code review
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2021-11-26 17:54:43 +01:00
Thilo Fromm
90af105e9f ci/garbage_collect: pick version, fix images + vms
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-11-26 17:54:43 +01:00
Thilo Fromm
5ed28497ba ci-autmation: support main- alongside alpha-, beta-...
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-11-26 17:54:43 +01:00
Thilo Fromm
337e0d7c3c SDK container: spelling + cp optimisation from code review
Add suggestions by @pothos from code review
- use `cp --reflink=auto`
- spelling error fixes

Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2021-11-26 17:54:43 +01:00
Thilo Fromm
9fba5789f9 ci-automation: simplified CI automation unsing containers
ci-automation builds on the SDK container and simplifies CI automation
build tasks (SDK bootstrap, SDK container, packages, image, VMs).

See ci-automation/README.md for a brief introduction.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-11-26 17:54:43 +01:00