summaryrefslogtreecommitdiff
path: root/docs/ci.rst
blob: ee85018c49eb92ab5fb3dd42c4f8c429a0cebd8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
==============================
Libvirt Continuous Integration
==============================

.. contents::

The libvirt project uses GitLab CI for automated testing.
`Here's <ci-dashboard.html>`__ our CI dashboard which shows the current status
of our pipelines.

Builds and unit tests
=====================

Linux builds and cross-compiled Windows builds happen on GitLab CI's shared
runners, while FreeBSD and macOS coverage is achieved by triggering `Cirrus CI
<https://cirrus-ci.com/>`_ jobs behind the scenes.

Most of the tooling used to build CI pipelines is maintained as part of the
`libvirt-ci <https://gitlab.com/libvirt/libvirt-ci>`_ subproject.

Integration tests
=================

Integration tests in our CI pipelines require dedicated HW which is not
available to forks, see `GitLab CI Custom Runners <ci-runners.html>`__.
Therefore, in order to execute the integration tests as part of your libvirt
fork's GitLab CI you'll need to provide your own runner. You'll also need to
set a few CI variables to run the integration tests as part of the CI pipeline,
see below.

GitLab CI variables
-------------------

* ``LIBVIRT_CI_INTEGRATION`` - enables integration test runs manually or in forks
* ``LIBVIRT_CI_INTEGRATION_RUNNER_TAG`` - overrides the upstream runner tag on the

Retrieving test logs
--------------------

In case the integration test suite fails in our CI pipelines, a job artifact is
generated containing Avocado logs, libvirt debug logs, and the latest traceback
(if one was produced during a daemon's execution).

Adding new OS platforms OR build pre-requisites
===============================================

Since all of the Dockerfiles libvirt uses for CI have been generated by ``lcitool``
provided by the `libvirt-ci <https://gitlab.com/libvirt/libvirt-ci.git>`__ project,
most relevant changes will need to be introduced to ``lcitool`` first. Please
follow the instructions outlined
`here <https://gitlab.com/libvirt/libvirt-ci/-/blob/master/docs/platforms_and_mappings.rst>`__


Running CI workloads locally
============================

If you're interested in running the CI test workloads locally, please read
our `testing <testing.html>`__ guide.