Commit Graph

106 Commits

Author SHA1 Message Date
Sebastien Boeuf
c93b7037b4 Jenkinsfile: Update the way to download private images
Since we ran into issues while using the Azure credentials plugin for
Jenkins, let's rely directly on the Azure CLI to download the Windows
guest image along with the modified OVMF firmware.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-21 19:20:37 +02:00
Rob Bradford
fb2e8b6817 Jenkins: Migrate workers to Hirsute Hippo
Groovy is EOLed on 2021-07-22.

Fixes: #2769

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-06-18 11:44:56 +02:00
Sebastien Boeuf
4db7530f28 ci: Add OVS-DPDK integration test
In order to avoid regression regarding OVS-DPDK support, a new
integration test is added. This test consists of running two VMs, both
attached to a distinct OVS port, where both ports are connected to an
OVS bridge. Once the VM are running, the test validates the connection
between the two VMs works correctly.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-01 12:17:23 +02:00
Sebastien Boeuf
1f94208090 Jenkinsfile: Don't wait for a node that is not being used
Since SGX and VFIO tests don't need to be run on pull requests, we
should not have to wait for the corresponding node (bionic-sgx or
bionic-vfio) to become available in order to skip them.

Fixes #2607

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-05-07 11:56:36 +01:00
Sebastien Boeuf
0a00df2e7e tests: Dynamically assign IPs for Windows integration tests
Relying on dnsmasq running on the host, the Windows guest are now
getting allocated with the expected IP addresses. This allows for
multiple VMs, therefore multiple tests to run in parallel.

The end goal is to reduce the time spent running Windows integration
tests.

Fixes #1891

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-05-06 17:27:33 +02:00
Sebastien Boeuf
04dc496808 ci: Enable baremetal VFIO integration tests
Relying on a NVIDIA Tesla T4 card present in the SGX machine, this patch
enables baremetal VFIO testing, validated by running several NVIDIA
tools in the guest. The guest image has been prepared to include all the
software needed to run these tests.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-03-16 18:59:46 +00:00
Sebastien Boeuf
d65a0b68b9 Revert "Jenkinsfile: Temporarily disable SGX CI"
This reverts commit 526cf32a78.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-03-05 19:02:30 +01:00
Sebastien Boeuf
526cf32a78 Jenkinsfile: Temporarily disable SGX CI
Since the SGX server is down for maintenance, all builds are waiting on
the node agent to answer, causing all PRs to be blocked.

Let's disable temporarily the SGX CI until the server is back up.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-03-03 09:56:05 +00:00
Rob Bradford
99baee8d37 tests: Move Windows integration test to updated OVMF
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-03-01 22:11:19 +00:00
Sebastien Boeuf
b49c7dfd65 ci: Always download the Windows image
Because we're back on transient builder, let's download the image
everytime.

This reverts commit b5653d5278.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-01-08 17:18:28 +00:00
Rob Bradford
8f740f5c02 Jenkinsfile: Disable fast failing
Temporarily disable fast failing to try and make progress on CI
stabilisation to allow more test coverage.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-01-08 12:24:33 +00:00
Rob Bradford
b5653d5278 Jenkinsfile: Don't download the Windows images
They are already provisioned on the builder machine.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-01-07 17:31:02 +00:00
Rob Bradford
05f785fa88 build: Move timeouts to integration test blocks
If we rely on timeouts at the top level we can get builds being aborted
simply because they took too long to be scheduled rather than because
the actual integration tests took too long.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-11-27 19:18:39 +01:00
Rob Bradford
8bd3fdea8f build: Move on-demand workers from bionic to groovy
This is an interim step to be able to test io_uring on our CI system.

See: #1561

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-10-26 14:27:20 -07:00
Rob Bradford
1bae38ceb4 build: Add Jenkinsfile entry for Windows guest
Add one more parallel stage to run Windows guest tests in a dedicated
VM.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-10-14 11:19:29 +02:00
Rob Bradford
036c2e5e45 Jenkinsfile: Remove "Build" steps from Jenkinsfile
Build testing of changes happens on GitHub actions and the integration
tests will build the binary (with different feature flags) again. So
these earlier build operations are just wasted time on the critical
path.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-09-18 12:48:30 +01:00
Sebastien Boeuf
56b0c85578 ci: Introduce SGX integration testing
Extending the Cloud-Hypervisor CI to allow for testing SGX on a
dedicated machine where special image and kernels are ready.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-09-09 15:33:49 +02:00
Sebastien Boeuf
d751f419de Jenkinsfile: Force the cleanup after stages are aborted
Problem with the previous solution was that Cleanup stage was not
executed when previous stages failed. We fix this by adding a post
section that executes always after the Aarch64 build completed, no
matter if it has failed, succeeded or been aborted.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-19 09:26:36 -07:00
Sebastien Boeuf
bcbc098c66 Jenkinsfile: Add a cleanup stage
Cleanup of the Aarch64 machine can't be done as part of the parallel
stage as this is often skipped. When the build is aborted because
another parallel stage failed, the post actions are simply not
performed. That's why we need a dedicated stage, out of the parallel
ones, to cleanup the Aarch64 machine.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-19 11:23:06 +02:00
Sebastien Boeuf
17a0733527 Jenkinsfile: Don't retry integration tests on failure
We recently added the ability for the gnu and musl workers to retry if
integration test were not passing, relying on some simple Jenkins
options. Unfortunately, this is not working as expected as the retries
never pass either. The suspected reason is the machine itself, which
might be scheduled on some specific hardware, which makes our VMs more
error prone.

Bottom line, on a faulty machine, the tests will always fail, therefore
there is no added value in retrying on the same machine.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-14 16:44:35 +02:00
Rob Bradford
01b1412914 Jenkinsfile: Move OpenAPI validation to worker
Remove this work from the Jenkins master.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:53:16 +01:00
Rob Bradford
cf1a1ac6cf Jenkinsfile: Stop running "cargo" checks on master
These checks are now handled via GitHub actions.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:09:24 +02:00
Rob Bradford
7b621bde4f Jenkinsfile: chown the workspace before cleaning up
If the build was aborted then the dev_cli.sh code that is responsible
for changing the file ownership will not get run. This results in the
failure to delete some of the files in the workspace.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 09:10:46 +01:00
Rob Bradford
c5a03d5ad4 build: Remove job directory on ARM64 build
This prevents the builder from running out of disk space.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-10 14:55:50 +01:00
Rob Bradford
1c4e8ac5ce Revert "build: Temporarily disable ARM64 builds"
This reverts commit 743ebe2fa6.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-07 10:35:50 +01:00
Sebastien Boeuf
20cd778c5b ci: Retry integration tests if failing
Both gnu and musl workers will retry integration tests up to 3 times if
they fail. This should give us a better pass rate, without having to
restart the entire build every time a single glitch happens.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-06 08:29:50 +01:00
Rob Bradford
743ebe2fa6 build: Temporarily disable ARM64 builds
The builder is not currently responding to pings.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-05 17:51:20 +01:00
Rob Bradford
44cf97e2fd build: Fix Jenkinsfile syntax
Turns out that "when" blocks are permitted but not effectual in "post"
sections so instead use a script behaviour to make the message
conditional on build change.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-05 14:49:33 +01:00
Rob Bradford
2e98208af5 build: Alert on Slack when master build regresses or is fixed
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-05 13:14:20 +02:00
Henry Wang
5a2ff98917 ci: AArch64: Add a build stage for musl toolchain
This commit adds required environment configurations to the
`dev_cli.sh` and a Jenkins stage to enable AArch64 binary
building using musl toolchain.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2020-07-15 08:19:15 +02:00
Henry Wang
603445e0a5 tests: Add a Jenkins stage for AArch64 integration test
This commit adds a Jenkins stage for AArch64 integration test,
and the test is carried out using the GNU toolchain.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2020-07-07 13:55:39 +01:00
Henry Wang
462c58d58b tests: Enable AArch64 Jenkins CI with unit tests for GNU
This commit enables the AArch64 Jenkins CI with build and running
unit tests for GNU toolchain.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2020-06-29 18:00:42 +01:00
Rob Bradford
176d671609 build: Run musl builds in parallel to glibc builds
Run these builds against every PR rather than just master.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-06-10 10:16:57 +01:00
Samuel Ortiz
50134969b9 Jenkins: Run musl unit and integration tests on master branch
And use a bumped up container image for that.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-04-29 17:57:01 +01:00
Rob Bradford
e0419e988b build: Don't cancel older master builds
If a new build request for master comes in don't cancel the older
builds. Cancelling older builds is very useful for PRs that are being
updated but less so for a build of the master branch that has been
triggered via a merge or a periodic build.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-03-05 12:08:33 +01:00
Rob Bradford
08a68f2f0f build: Run unit tests on worker node
The unit tests require higher privileges so for safety run on the worker
nodes.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-17 15:41:06 +00:00
Rob Bradford
a94887e051 build: Use dev container for integration tests
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-17 15:06:04 +00:00
Rob Bradford
9bf100c91c build: Run worker and master build in parallel
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-07 17:24:32 +00:00
Rob Bradford
6e6eb5b55e build: Do cargo tests, unit tests and OpenAPI check on master
Rather than on the CI nodes.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-07 17:24:32 +00:00
Sebastien Boeuf
a40a70ad86 ci: Rely on latest virtiofsd version
Virtio-fs maintainers recently updated the virtiofsd daemon through
their official branch on Gitlab. It includes fixes that were needed for
cloud-hypervisor to work correctly with it.

Jenkinsfile needs to be updated since the virtiofsd build requires both
libseccomp and libcap-ng to be present on the system.

One thing to notice, because the latest branch introduced a change
regarding libfuse behavior, the counterpart patch has been added to the
custom kernel branch "virtio-fs-virtio-iommu".

Fixes #536

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-12-12 11:09:36 +01:00
Rob Bradford
36daf9c0b0 ci: Skip testing RFC or WIP PRs
To alleviate load on the CI only test PRs that are not marked as RFC or
WIP.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-12-11 18:22:12 +01:00
Rob Bradford
59ae01ff71 ci: Cancel older builders on Jenkins
When a new build is triggered cancel any older builds to conserve
resources.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-12-11 15:50:01 +00:00
Sebastien Boeuf
4c92f89f0f ci: Add OpenAPI validation
We need to validate that OpenAPI YAML definition is not broken by each
and every pull request. The easiest way is to rely on the Docker image
provided by OpenAPITools, as it allows us to validate the definition
with one simple command.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-12-11 12:53:31 +00:00
Sebastien Boeuf
d42ef186a1 ci: Offload cargo tests to the worker node VM
Because the resources on the amount of worker nodes we can have access
to through Travis is limited, we offload the burden of running all tests
related to Cargo inside the Azure VM directly.

This will have the positive effect of stopping the build very early in
case something goes wrong during the Cargo testing.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-12-11 12:53:31 +00:00
Rob Bradford
0213177027 Jenkinsfile: Add timeout for build
In order to conserve CI resources limit build execution to one hour.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-11-22 06:52:21 -08:00
Rob Bradford
d642060378 Jenkinsfile: Switch to pipeline (declarative format)
Switch the Jenkinsfile from the scripted format over to the declarative
format.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-11-22 06:52:21 -08:00
Sebastien Boeuf
4d86359a09 ci: Install socat on the host VM
In order to interact between host and guest through socket connection,
socat is a useful utility needed for integration testing.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-09-10 17:57:49 +02:00
Rob Bradford
8b78e1221e tests: Use newgrp to run unit tests
Rather than set filesystem permissions on the /dev/kvm device instead
use the kvm group added by installing qemu for running the unit tests.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-08-16 09:54:07 -07:00
Sebastien Boeuf
3645bf8d0f tests: Build virtiofsd from specific branch
In order to be able to use the latest version from virtiofsd binary, the
integration tests will now build it directly from a branch located on
sboeuf's QEMU fork. The same way the kernel is hosted on sboeuf's linux
kernel fork, this allows to update the version of the virtiofs daemon
based on latest patches from virtio-fs maintainers.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-08-13 13:57:53 +02:00
Samuel Ortiz
5ae3144f5b tests: Add VFIO integration test
The VFIO integration test first boots a QEMU guest and then assigns the
QEMU virtio-pci networking device into a nested cloud-hypervisor guest.
We then check that we can ssh into the nested guest and verify that it's
running with the right kernel command line.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-07-24 11:55:08 +02:00
Rob Bradford
492ab7a1a8 build: Use tmpfs for /tmp
On the Jenkins build slaves disk I/O is a bottlneck so make /tmp a tmpfs
which removes I/O issues when running lots of VMs at the same time.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-07-18 18:01:18 +02:00
Rob Bradford
78fe807284 build: Run unit tests on the Jenkins server
The addition of [workspace] to the top level Cargo.toml is necessary to
have the binaries colocated together.

The Cargo.lock files have also been refreshed by the change to the
Cargo.toml.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-07-16 17:09:05 +02:00
Sebastien Boeuf
785db6295e test: Add virtio-pmem integration tests
Add 2 integration tests to validate virtio-pmem works as expected.
One test takes care of checking the ability to read and write to this
persistent memory from the guest, and validates that the data is
carried over the virtualization boundary.
The other test ensures the VM can be booted directly from an image
that would be passed through virtio-pmem.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-07-01 14:38:55 +01:00
Sebastien Boeuf
2a7fbe8eae CI: Fix the Ubuntu VM update stuck on an interactive window
We need to export the variable DEBIAN_FRONTEND=noninteractive from the
Jenkinsfile if we want to make sure the VM update won't get stuck into
an interactive window.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-06-17 23:24:38 +02:00
Rob Bradford
72f3a69796 tests: Add test for booting from vmlinux
Download and build a Linux kernel and use the vmlinux produced as the
kernel used with a direct boot kernel test.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-06-10 16:49:34 +01:00
Rob Bradford
ddce3df826 tests: Add basic integration testing
Add basic integration testing of the hypervisor using a cloud-init to
configure the VM at boot and SSH to control it at runtime.

Initial test just boots the VM up checks some basic resources and
reboots. With a second test that calls into the first to check that
subsequent tests work correctly.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-06-06 11:03:13 +01:00