Commit Graph

101 Commits

Author SHA1 Message Date
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
Sayan Chowdhury
cc147a1255
Add the new OEM type, and selective upload azure as private
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
2020-09-19 18:58:12 +05:30
Marga Manterola
e04156a0f1
bootstrap_sdk: build and upload SDK toolchain pkgs
Before, we were relying on the toolchains job to build and upload
packages that were part of the SDK. With this change, all packages that
should be part of the SDK are built and uploaded by the SDK job. The
toolchains job only builds toolchain packages specific for the release.

This change includes several adjustments done to both the SDK and the
toolchains jobs to make this work:
 * Make the SDK job build all cross toolchains, including Rust
 * Stop building Rust in the toolchains job and use the one in the SDK
   instead.
 * In toolchain_util.sh: detect when the symlink folder for crossdev
   packages is missing and run crossdev to create it during
   update_chroot setup.
 * Make it possible to build the SDK starting from stage 4 instead of
   stage 1, to make the SDK building faster for PR branches / nightlies
   (full build should still be done for releases / weeklies).
2020-06-29 15:18:55 +05:30
Kai Lüke
06c4894f71
SDK: Take environment variable to specify SDK location
The dev build SDKs are not in $FLATCAR_DEV_BUILDS/sdk but published under
$FLATCAR_DEV_BUILDS/developer/sdk.
Add an environment variable to specify where the SDK is to be found
but default to $FLATCAR_DEV_BUILDS/sdk if it is not specified.
From Jenkins this variable is exported as DOWNLOAD_ROOT_SDK.
2020-05-14 16:03:15 +02:00
Kai Lüke
066deb9d09
build_packages: Add flag to ignore some binary packages
When the ebuild file changed but not its version nor its cross-workon
commit, the binary package would be used. Also some dependencies are not
encoded to trigger a rebuild of depending packages.
Allow to exclude some binary packages so that we can be sure that they
are rebuilt.
2020-05-11 16:26:35 +02:00
Kai Lüke
d61e6f9a1b
jenkins/images.sh: Generate production tar ball 2020-02-07 17:33:39 +01:00
Flatcar Buildbot
5b8c706c70
2387.0.0 2020-01-20 16:41:15 +01:00
Flatcar Buildbot
c7bbb2b1e2 2345.0.0 2019-12-04 14:59:11 +01:00
Flatcar Buildbot
1dad511f69 2317.0.1 2019-11-07 19:40:01 +01:00
David Michael
0148b0df16 jenkins: Stop trying to install catalyst
It's already built into the SDK.
2019-08-05 10:53:27 -04:00
David Michael
e45c7f1ec1 jenkins: Make the package build ccache more visible 2019-07-30 17:29:52 +00:00
David Michael
0bcf0e9fcf jenkins: Move workspace cleanup to the pipeline
More space can be saved by removing things that get overwritten on
the next job run, but they are used after this script runs (e.g.
for fingerprinting).  Drop the cleanup from these scripts and move
it all to the post-build pipeline stage.
2019-07-30 17:29:52 +00:00
David Michael
e9f17c8143 jenkins: Drop the unused arm64 image format list 2018-10-23 17:36:30 +00:00
David Michael
1d19e63d43 jenkins/sdk: Drop redundant update_chroot
This happens from "cork update --create" already.
2018-10-12 20:09:24 +00:00
Andrew Jeddeloh
96a79a7678 jenkins/*: switch enter to --bind-gpg-agent=false
--experimental is deprecated.
2018-06-11 13:19:47 -07:00
Benjamin Gilbert
0e83301d8c build_library: drop oracle_oci_qcow image format
Images have been published to the release buckets, but never to OCI.
2018-04-25 22:40:29 -04:00
Andrew Jeddeloh
be16e7ce3f *: remove --prod_image in other scripts 2017-12-21 14:44:23 -08:00
Euan Kemp
ff26531e3a jenkins/formats-amd64: add oracle_oci_qcow 2017-09-25 14:13:21 -07:00
Euan Kemp
f496072a10 jenkins/images: use torcx packages from manifest
This accompanies the other changes around moving to a torcx manifest.
2017-09-08 16:59:54 -07:00
Euan Kemp
cc23e8e49e jenkins/packages: configure download root
Pending jenkins also including this variable.
2017-09-08 16:59:54 -07:00
David Michael
9256893e83 jenkins: Drop conditions not affecting this branch 2017-06-29 15:34:29 -07:00
David Michael
9cfed47be0 jenkins: Re-add Jenkins scripts to this repository
We are going to restore the split-script setup from the old Jenkins
server.  This ensures that the each version's release process is
actually running with scripts in the correct release branch.  It
also allows branching the VM format lists.

Note that the scripts added here only cover the currently active
jobs in the main build pipeline.  There is no reason to add other
jobs, since they are mostly just running a single command using a
mantle binary from its master branch.

The scripts in this repository pick up after Jenkins has set up an
environment with all parameters and credentials defined, and an SDK
was prepared and validated.
2017-06-29 15:16:54 -07:00