Old branches tend to be formatted with a different versions of clang-format, so when patches are backported, they introduce some differences in formatting, making the check-tree job to fail. These changes in formatting are normally small, and we don't pay much attention to them, causing that the pipelines are always red, increasing the work required to check if there are important failures or not. Make check-tree optional for branches other than main. This way, failures will be shown as a "warning", and if a pipeline only shows a warning we don't need to inspect it. (cherry picked from commit |
||
|---|---|---|
| .. | ||
| alpine-install.sh | ||
| ci.template | ||
| config.yml | ||
| debian-install.sh | ||
| fedora-install.sh | ||
| README.md | ||
| run-test.sh | ||
.gitlab-ci
We run tests in the gitlab-ci pipeline at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/pipelines
This directory contains a template for generating .gitlab-ci.yml.
It uses ci-templates project.
To get the right version of ci-templates, see the "Regenerate with" comment in
.gitlab-ci.yml. It shows how to install ci-fairy via
python pip. The exact version to be used is hard-coded as .templates_sha
variable in ci.template file.
Whenever changing relevant files, .gitlab-ci.yml must be regenerated.
Regenerate the yml by running ci-fairy generate-template.
There are also tests for checking that the yml is correct:
- run
tools/check-gitlab-ci.sh - run
make check-local-gitlab-ci, which runs 1). This also runs as part ofmake check.
In both cases, the test is skipped if ci-fairy is not in the path.
Install the correct ci-fairy version.
In gitlab-ci pipeline, the "check-tree" test also checks that .gitlab-ci.yml is up to date.