Commit graph

11 commits

Author SHA1 Message Date
Thomas Haller 339f99c08e
gitlab-ci: drop builds for CentOS 8 (8.1.1911, 8.2.2004, 8.3.2011)
CentOS Linux 8 is long gone. We were only running tests on this old
build environment, to see how we fare in such environment.

The test was broken for 4+ months. Instead of fixing it, disable it.

It's partly caused by RHEL8, as it is somewhat cumbersome to even build
on CentOS 8. That's because some devel packages (like libteam-devel) are
not installable. As workaround for that, we re-build such packages in a
copr ([1]). The problem is, that we only have one copr build for e.g.
CentOS 8. If we rebuild against latest CentOS 8 Stream, then libteam is
build against newer dependencies, which are not installable on CentOS
Linux 8.1.1911 (etc). We would have to build libteam in a way, that
does not drag newer dependencies that are missing on CentOS Linux 8.

For example, trying to use copr [1] on CentOS Linux 8 and installing
"teamd" gives:

  Error:
   Problem: package teamd-devel-1.31-4.el8.x86_64 requires teamd = 1.31-4.el8, but none of the providers can be installed
    - conflicting requests
    - nothing provides libjansson.so.4(libjansson.so.4)(64bit) needed by teamd-1.31-4.el8.x86_64

This could be hacked around, for example by having libteamd-devel not
depend on any teamd package. Instead, just drop it. It's gone.

Arguable, CentOS 8 Stream should be reasonably close (in terms of
versions of gcc, glibc, glib) so we don't miss too much.

[1] https://copr.fedorainfracloud.org/coprs/nmstate/nm-build-deps/

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1793
2023-11-15 10:52:53 +01:00
Thomas Haller 70084f2485
gitlab-ci: update ci-templates to fix installation of debian:9 containers
Debian 9 (stretch) is end of life, and the repositories are archived. We
need to patch the containers so that `apt-get update` continues to work.
A new ci-templates version brings that.

Note that at the moment, there is still another issue for debian:9
containers. Unclear whether that can be fixed. In any case, bumping to
latest ci-templates is not wrong, and works around the first issue on
debian:9, making it possible to at least look at the second issue.

https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/175
2023-05-31 22:14:23 +02:00
Thomas Haller 436b9cb005
gitlab-ci: improve "fedora-install.sh" for CentOS Stream 2023-05-22 14:47:42 +02:00
Fernando Fernandez Mancera 74f66ee276
gitlab-ci: fix CentOS Linux 9 containers during ".gitlab-ci/fedora-install.sh"
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1511
2023-01-24 08:17:44 +01:00
Thomas Haller 613af3251b
gitlab-ci: fix CentOS Linux 8 containers during ".gitlab-ci/fedora-install.sh"
See-also: https://stackoverflow.com/questions/70926799/centos-through-vm-no-urls-in-mirrorlist
See-also: https://techglimpse.com/failed-metadata-repo-appstream-centos-8/
2022-02-21 17:03:36 +01:00
Thomas Haller 4ce62b6df3
gitlab-ci: fix failure to enable PowerTools on CentOS8 build
Seems that the repository was renamed (or can sometimes have
a different name). Try both the "PowerTools" and "powertools" name.
2020-12-11 18:06:52 +01:00
Thomas Haller d07cd5dbf2
all: avoid GNU "which" from shell scripts
"which" is a separate package and may not be installed.
Also, shell has a built-in command for the same purpose.
Use that.
2020-12-11 16:42:23 +01:00
Thomas Haller f1ff6fe8b7
gitlab-ci: install correct version of ci-templates in build script
It's not clear that ci-fairy has a stable API. Instead, we pin the
version by specifying the git commit sha.

In the build script, install the pinned version.
2020-11-17 09:48:48 +01:00
Thomas Haller 7fa122394c
gitlab-ci: merge "check-ci-script" test with static checks
Certain parts of the code are entirely generated or must follow
a certain format that can be enforced by a tool. These invariants
must never fail:

  - ci-fairy generate-template (check-ci-script)
  - black python formatting
  - clang-format C formatting
  - msgfmt -vs

On the other hand, we also have a checkpatch script that checks
the current patch for common errors. These are heuristics and
only depend on the current patch (contrary to the previous type
that depend on the entire source tree).

Refactor the gitlab-ci tests:

- split "checkpatch" into "check-patch" and "check-tree".

- merge the "check-ci-script" test into "check-tree".
2020-11-10 13:51:29 +01:00
Thomas Haller a5d92d78c6
gitlab-ci: cleanup ".gitlab-ci/{build,fedora-install,debian-install}.sh"
Now that the individual steps are no longer in .gitlab.yml but we
run a full shell script, clean it up to be better readable.

Also, we need to fail the script when any command fails.
2020-11-10 13:51:29 +01:00
Peter Hutterer 35334f478b
gitlab CI: switch to using ci-templates
ci-templates encourages building specific containers that can be re-used:
- containers are re-used across pipelines, producing consistent results
- containers are re-used by contributors since they will use the upstream
  containers for their MR, thus guaranteeing the same results.

Containers are automatically rebuild whenever the respective
FDO_DISTRIBUTION_TAG changes. This is particularly interesting now that
Docker Hub will introduce pull limits.

This CI script consists of a config file and a jinja2 template, simply
running 'ci-fairy generate-template' produces the .gitlab-ci.yml.
ci-fairy is part of the freedesktop.org ci-templates and can be pip
installed, see the check-ci-script job.

Functional changes to the previous script:
- new job: check-ci-script, verifies that our gitlab-ci.yml is the one
  generated by the sources
- Added distributions:
  - Fedora 33
- The actual work is now down by a set of scripts in .gitlab-ci/,
  specifically:
  - .gitlab-ci/build.sh is the previous do_build job
  - .gitlab-ci/{fedora|debian}-install.sh are the previous {fedora|debian}_install jobs
  symlinks are in place for centos and ubuntu

Why the scripts instead of steps in the CI? Easer to reading and
reproduce. With the containers being static, it's easy to pull one
locally and re-run the CI job to reproduce an issue. Having everything in a
single script makes that trivial.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/664
2020-11-09 09:28:11 +01:00