The containers will bring some benefits
to the overall CI proccess:

1) Reproducibility, there is high chance
that if the test is failing constantly on CI
users can reproduce it by getting the same image
and running the affect test.

2) Ease of use, for any new contributor it should
be easier to have working test environment by just
mimicking the steps in test.yml.

3) We can avoid installation of packages during every
test run. The overhead is not that big ~2 min, but
it still can be considered as plus.

In order to do that there are few steps required.
This series add some missing pieces to the ci.sh
script that was introduced earlier.

There is a new Dockerfile for Ubuntu based images
as well as addition of some missing packages to the
existing Fedora one.

To keep the images up to date the process is
automated by running the image build job every week.
The job will produce both Fedora and Ubuntu images
for x86_64 and arm64. The list of architectures
and distros can be extended anytime.

The last two patches that actually do the transition
itself are marked as RFC for now because they need the
images to be published first. They are kept in the series
to show what is the direction of this series.

All steps have been tested on my fork.

The automatic build: https://github.com/almusil/ovn/actions/runs/4415557943
The GH test run: https://github.com/almusil/ovn/actions/runs/4419187229
The Cirrus CI run: https://cirrus-ci.com/build/4586570494246912

Ales Musil (9):
  ci: Add missing packages to the container
  ci: Use the latest Fedora as base image
  ci: Add argument for the py-requirements path
  ci: Add Ubuntu based Dockerfile
  ci: Add argument to archive logs on failure
  ci: Mark the ovn workdir as git safe within container
  ci: Add automation for building the containers
  ci: Use container to run the tests
  ci: Switch Cirrus CI to use the new image

 {utilities/containers => .ci}/ci.sh      | 46 +++++++++++++++---
 .ci/linux-prepare.sh                     | 21 --------
 .cirrus.yml                              | 13 +----
 .github/workflows/containers.yml         | 55 +++++++++++++++++++++
 .github/workflows/test.yml               | 54 +--------------------
 Makefile.am                              |  3 +-
 build-aux/initial-tab-whitelist          |  1 +
 utilities/automake.mk                    |  2 +-
 utilities/containers/Makefile            | 10 ++--
 utilities/containers/fedora/Dockerfile   |  8 ++-
 utilities/containers/py-requirements.txt |  1 +
 utilities/containers/ubuntu/Dockerfile   | 62 ++++++++++++++++++++++++
 12 files changed, 178 insertions(+), 98 deletions(-)
 rename {utilities/containers => .ci}/ci.sh (70%)
 delete mode 100755 .ci/linux-prepare.sh
 create mode 100644 .github/workflows/containers.yml
 create mode 100755 utilities/containers/ubuntu/Dockerfile

-- 
2.39.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to