Commit Graph

71 Commits

Author SHA1 Message Date
Krzesimir Nowak
71796c9e23 jenkins/manifest: Accept PR numbers also for scripts 2021-12-16 13:37:15 +01:00
Dongsu Park
3960ce8036 jenkins: make release.sh publish arm64 for Stable
From flatcar-3033 on, arm64 images are available for Stable channel, we
need to also add arm64 to Stable boards.
2021-12-10 11:31:34 +01:00
Dongsu Park
1b323ae6f9 jenkins: make release.sh publish arm64 for Beta
Now that arm64 images are available for Beta channel, we need to also
add arm64 to Beta boards.
2021-12-09 17:42:30 +01:00
Dongsu Park
5c391e9008 jenkins: override PARALLEL_TESTS for ARM servers in da11
We override `PARALLEL_TESTS`, because kola run with PARALLEL_TESTS >= 4
causes the tests to provision >= 12 ARM servers at the same time. As the
da11 region does not have that many free ARM servers, the whole tests
will fail. With PARALLEL_TESTS=2 the total number of servers stays < 10.
In addition, we override `timeout` to 10 hours, because it takes more
than 8 hours to run all tests only with 2 tests in parallel.
2021-11-25 16:55:10 +01:00
Mathieu Tortuyaux
c746ab2333
kola/packet: override EM region for ARM64 server
Equinix Metal ARM server are not yet hourly available in the default `sv15` region
so we override the `PACKET_REGION` to `Dallas` since it's available in this region.
We do not override `PACKET_REGION` for both board on top level because we need to keep proximity
for PXE booting.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-11-22 19:43:27 +01:00
Jeremi Piotrowski
50ed7f3007
Merge pull request #178 from flatcar-linux/jepio/update-chroot-setuponly
update_chroot: introduce '--setuponly' flag
2021-10-26 13:53:41 +02:00
Jeremi Piotrowski
385f5779b7
Merge pull request #177 from flatcar-linux/jepio/github-status
jenkins: publish github status 'pending' at beginning of manifest job
2021-10-25 16:46:55 +02:00
Jeremi Piotrowski
2213e9beea update_chroot: introduce '--setuponly' flag
Currently the os/sdk and os/toolchains job perform a chroot update whose
results are immediately discarded because the rest of the build uses a fresh
chroot and catalyst. Towards the end of a release period this can extend the
build time by about an hour (longer if rust is involved).

Introduce a `--setuponly` flag that bails after the chroot configuration, and
the skips chroot update.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-10-25 14:14:26 +02:00
Jeremi Piotrowski
abf849ce57 jenkins: publish github status 'pending' at beginning of manifest job
and add script used for that purpose. This requires access to a github PAT
with 'repo.status' permissions.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-10-25 13:44:15 +02:00
Sayan Chowdhury
2fe1e979c0
jenkins/kola/packet: Remove c3.small.x86 to try running cl.internet
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2021-10-22 21:21:39 +05:30
Kai Lueke
0bd6d1aae5 jenkins/kola/aws.sh: use larger arm64 instance type for kubeadm
Currently the kubeadm tests fail on arm64 because the instance type
only offers 1 vCPU:
cluster.go:117: error execution phase preflight: [preflight] Some fatal errors occurred:
cluster.go:117: [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2

Switch to the next larger instance type which has 2 vCPUS.
2021-10-21 14:03:39 +02:00
Sayan Chowdhury
0028f95a26
packet: Update the base URL to point to bucket.release.f-ln
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2021-10-21 14:01:09 +05:30
Sayan Chowdhury
e04af554fa
do: Update the base URL to point to bucket.release.f-ln
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2021-10-21 12:03:54 +05:30
Mathieu Tortuyaux
5c304ffac9
jenkins/kola/qemu: run update_chroot only for amd
if the test is ran for ARM64, there is no need to run `update_chroot`
since there is no SDK.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-19 11:29:56 +02:00
Kai Lueke
a668d961a9 jenkins: use the SDK_URL_PATH path for DOWNLOAD_ROOT_SDK
The SDK can either be a release SDK or a dev build SDK which are stored
in different paths. DOWNLOAD_ROOT_SDK should be based on the
SDK_URL_PATH value which indicates whether it's a release or dev build
path.
2021-10-15 14:35:08 +02:00
Mathieu Tortuyaux
97de2c4301
Merge pull request #169 from flatcar-linux/tormath1/fix-sdk-download
jenkins/sdk: download SDK Digest to prevent twice downloading
2021-10-14 17:40:45 +02:00
Mathieu Tortuyaux
46a03d3940
jenkins/sdk: download SDK Digest to prevent twice downloading
bootstrap_sdk runs catalyst.sh which will try to download the SDK if the
verify digest fails.
Importing the DIGEST allows to skip this step and to continue with the
previously downloaded SDK.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-14 17:39:59 +02:00
Jeremi Piotrowski
aae8bdf74b
Merge pull request #167 from flatcar-linux/jepio/simplify-pr-builds
jenkins/manifest: support PR numbers in PORTAGE_REF/OVERLAY_REF variables
2021-10-14 17:36:14 +02:00
Jeremi Piotrowski
824199efea jenkins/manifest: accept PR numbers in PORTAGE_REF/OVERLAY_REF
When PORTAGE_REF or OVERLAY_REF are numbers, we can change the way the refspec
is constructed to allow fetching a PR instead instead of a branch. Checking for
equality using '[' works to detect numbers, bash's '[[' doesn't.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-10-14 11:16:11 +02:00
Mathieu Tortuyaux
dcfe4cfa09
jenkins/toolchain: do not use the mantle embedded key to verify
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-13 18:23:54 +02:00
Mathieu Tortuyaux
4e1e707628
jenkins/kola/container: pass PORTAGE_BINHOST to container
Otherwise, it was failing since we check for unbound variable:
```
/bin/bash: line 1: PORTAGE_BINHOST: unbound variable
```

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-13 10:57:35 +02:00
Mathieu Tortuyaux
982a26c835
jenkins/sdk: add default DOWNLOAD_ROOT
Otherwise, the variable is empty and it creates errors later. Default
value is `gs://flatcar-jenkins`. Not `GS_DEVEL_ROOT` because if we check
the previous behavior, `DOWNLOAD_ROOT` was hardcoded with:
```shell
DOWNLOAD_ROOT_SDK=https://storage.googleapis.com/flatcar-jenkins/sdk
```

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-12 17:17:01 +02:00
Mathieu Tortuyaux
47f5feff68
jenkins/kola/container: fix verify-key sharing in systemd container
`$verify_key` actually holds `--verify-key=verify.asc` so of course
`systemd-nspawn` fails since it does not expect `--verify-key` value.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-12 16:27:29 +02:00
Jeremi Piotrowski
24128594e0
Merge pull request #163 from flatcar-linux/tormath1-jepio/ci-authenticated
jenkins: use private bucket with authentication for fetching binaries.
2021-10-12 13:33:22 +02:00
Jeremi Piotrowski
d9542cec7d jenkins/toolchains: fetch DIGESTS file to allow reusing downloaded SDK as seed
The catalyst build uses the same SDK version as seed as the current SDK, but
will only reuse the cached tarball if a DIGESTS file exists and is correct.
Prefetch this file to prevent the build from trying to access google storage
anonymously.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-10-12 13:32:10 +02:00
Mathieu Tortuyaux
46ac63fdee jenkins/vm: remove --sdk-url
`download-image` already holds the remote host with the --root flag.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-12 13:32:10 +02:00
Jeremi Piotrowski
cbf003e617 jenkins: use 'cork create' instead of 'cork update'
because we need to pass google credentials to update_chroot, and 'cork update'
doesn't support that.

Add --sdk-url-path to sdk.sh for new cork default.
2021-10-12 13:32:07 +02:00
Jeremi Piotrowski
93cf5aa5c3 jenkins: use gs:// uri for DOWNLOAD_ROOT_SDK so that we can apply authentication 2021-10-12 13:31:39 +02:00
Mathieu Tortuyaux
7ef55eb15d
kola/dev-container: override binhost to use private GCS
in this commit we make sure to use GCS bucket for dev container tests by
providing the required credentials and the associated fetch command.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-11 14:42:09 +02:00
Mathieu Tortuyaux
998d2f4fc6
jenkins: add --json-key to cork update commands
it pulls https://github.com/flatcar-linux/mantle/pull/239 to be able to
use `--json-key` in order to access private GCS bucket

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-07 14:41:16 +02:00
Mathieu Tortuyaux
d9bf2e89c5
jenkins/manifest: use gsutil to download SDK version
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2021-10-06 17:27:23 +02:00
Sayan Chowdhury
ccdc52cc15
Merge pull request #155 from flatcar-linux/krnowak/trap-fixes
Fix the traps to align with bash 5.1 upgrade
2021-10-01 21:49:27 +05:30
Kai Lueke
e24c456889 jenkins/kola/packet.sh: fix check for skipping machine type tests
The cl.basic and cl.internet tests are different tests which wasn't
clear before. Also, the grep process returns an exit code of 1 if it
didn't find a match, causing the job to cancel. The list of tests is
space separated and should not be quoted but on the other hand, we
do have to handle a literal *.
Look for the right test and handle the grep exit code, and disable
globs for the subshell for preserving a literal *.
2021-09-30 11:50:30 +02:00
Kai Lueke
6a04b54f0b jenkins: run simple network test on different hardware
The Linux 5.10 stable kernel introduced a regression that we didn't
catch because we only run kola on one hardware type in Equinix Metal.
Validate that a simple network test works on various instance types of
the current hardware generation.
2021-09-28 18:10:24 +02:00
Krzesimir Nowak
eee6b50aa5 *: Do not use RETURN traps
It has some weird semantics that seem to trip us up after updating
bash to 5.1. We tried to use it inside functions to clean up some
stuff after function returns. This can be emulated with an EXIT trap
within a subshell. Fortunately all the users of the RETURN trap were
not setting any global variables - modifications of such variables are
local to the subshell and are lost when the subshell exits.
2021-09-27 20:18:22 +02:00
Jeremi Piotrowski
c8dd87c095 jenkins: add script to run kola arm64 tests under docker
Included is a dockerfile that installs system deps of kola in an debian:11
image. For the test script, the control flow is:

qemu_uefi.sh
  qemu_uefi_arm64.sh
    (docker)
      qemu_common.sh

qemu_common uses the 'NATIVE_ARM64' variable passed by the jenkins job to control the behavior.
The differences are:

* use git directly to fetch (and verify) the manifest
* setup some symlinks so that /var/tmp is on the same BTRFS partition as $PWD/tmp
* setup symlinks so that we don't have to fixup installation of mantle to chroot
* run things directly instead of in chroot through cork

The whole script is executed as root, because kola requires root privileges
anyway and making kvm and sudo work with an arbitrary host user inside the
container would require a custom entrypoint to setup groups.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-09-06 14:08:11 +02:00
Kai Lueke
0e8ea8b9d7 jenkins/kola/qemu_common.sh: continue regular tests even if update test fails
The update test runs first but if it fails, we still want to continue
with the regular test suite.
2021-09-02 10:38:02 +02:00
Jeremi Piotrowski
a2b3950ac2 jenkins: add support for running tests on Azure Gen2 VMs
This requires passing the --azure-hyper-v-generation=V2 argument to kola. The
vhd/image is the same as for azure gen1 vms, the azure_gen2 specifier is only
for jenkins usage.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-08-26 19:14:10 +02:00
Kai Lüke
e96c1c5e6d jenkins/kola/qemu(_uefi): run update test from previous release
The newly enabled update test performs an update from the built image
to itself. This is useful to test that the update mechanism didn't
break but it doesn't say if the built image will be accepted as update
from the previous official release.

Introduce an additional kola run that begins from the previous official
release and tests to update to the built image. Since the test does two
updates it also covers the case of updating from the built image to the
built image. Thus, we can skip the test in the normal run.
This new kola run is done first to keep the qemu-latest symlink valid
for the main test suite.
2021-07-27 11:51:58 +02:00
Kai Lüke
1b70f59cd0 jenkins/kola: share a single qemu script file 2021-07-26 15:01:24 +02:00
Kai Lüke
177bea4a74 Generate test update payload and run the kola update test
The kola update tests need a dev-key-signed update payload. This was
lacking and caused the update tests to be skipped.
Generate the test update payload for both dev builds and release builds
and run the kola tests for both. The test update payload has a special
name to not confuse it with the real update payload for releases, and
we keep the previous behavior to sign releases. Therefore, the
generate_update function wasn't used but the extract_update function
extended with generating the additional test payload.
2021-07-12 18:49:54 +02:00
Kai Lüke
d1b97aff42 jenkins/systemd-run-wrap.sh: randomize unit name suffix
The timestamp alone was not enough to prevent unit name clashes.
Add a random suffix to greater reduce the chance of hitting a clash.
2021-07-08 21:31:04 +02:00
Kai Lüke
8eaef708be jenkins: move all inline bash scripts to flatcar-scripts
The logic of the inline bash scripts of each job was sometimes
separated into the flatcar-scripts/jenkins/*.sh helpers but mostly
part of the Groovy file. This coupling had its advantages but also
downsides when special cases needed to be added for different release
versions. Other issues were that the inline scripts needed the
backslash character to be escaped twice and Jenkins was not good in
terminating the child processes when stopping a job. Having inline
bash scripts in Groovy also mandated the use of Jenkins to build and
release Flatcar Container Linux which hinders test builds in other CI
platforms.
Move the inline bash scripts fully to to the files in
flatcar-scripts/jenkins/ and create new ones for job that didn't have
a script there yet. Also invoke them through a systemd-run wrapper
script which ensures that all child processes are terminated and also
sets up /opt/bin as additional path for the static lbzcat binary.
A workaround for bash 4 was needed to use a temporary file instead of
the <(cmd) bash feature which caused a strange syntax error, otherwise
the bash commands are moved as they are.
2021-06-30 16:31:58 +02:00
Thilo Fromm
11e862e2d5 jenkins/sdk.sh: add stage1 portage and overlay refs
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-04-23 16:23:10 +02:00
Kai Lüke
8aab1d6d5a jenkins/vm: expect a FORMATS parameter which has a list of formats
One Jenkins jobs for each image format caused a large overhead.
Allow to build multiple image formats in one job.
2021-02-18 13:42:15 +01:00
Margarita Manterola
cf7f4bd4a4 Add GCE Pro OEM type 2020-12-22 13:52:52 +01:00
Kai Lüke
f84ca169e5 Add AWS Pro OEM type
This is the initial creation of an AWS Pro image coming with support,
and features added on top of it.
2020-12-09 16:38:28 +01:00
Dongsu Park
829cec45e8 jenkins: do not configure ccache variables
Setting the invalid CCACHE_ variables resulted in strange failure
in projects depending on meson, newer version like 0.55.3. For example
systemd build fails like the following errors:

```
 * ACCESS DENIED:  utimes:       /mnt/host/source/ccache
 * ACCESS DENIED:  utimes:       /mnt/host/source/ccache

F: utimes
S: deny
P: /mnt/host/source/ccache
A: /mnt/host/source/ccache
R: /mnt/host/source/ccache
C: ccache cc /build/amd64-usr/var/tmp/portage/sys-apps/systemd-246/work/systemd-246-abi_x86_64.amd64/meson-private/sanitycheckc.c -o /build/amd64-usr/var/tmp/portage/sys-apps/systemd-246/work/systemd-246-abi_x86_64.amd64/meson-private/sanitycheckc.exe -O1 -pipe -pipe -D_FILE_OFFSET_BITS=64
```

We should not set up ccache at all, as it has been already disabled in
coreos-overlay repo.
2020-10-26 15:38:57 +01:00
Sayan Chowdhury
23c72c0a5c
Add Azure Pro to the list of amd64 format list
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-28 23:09:36 +05:30
Sayan Chowdhury
9953cc8c8f
build_library: Rename the images to use pro instead of premium
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-21 20:31:41 +05:30