summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: remove container cleanup stagesThomas Haller2023-05-091-303/+8
| | | | | | | | | | | | | These stages were not properly implemented and don't seem to work. Drop them. Note that we do want that our cached containers get collected eventually. As these are just caches for performance reasons, that could be done with little downsides (we can just regenerate the containers when we need them). However, that's not done by our gitlab-ci stages. Instead, it should be done on a project level. It's not clear whether that is actually done, but if there is a need (because of the resources that this wastes), then we should do that (on freedesktop.org's gitlab instance).
* gitlab-ci: make detached MR pipeline for external contributor's pipelines to runThomas Haller2023-04-131-6/+13
| | | | | | | | | | | | | | The permissions for running CI will be restricted to external contributors. It will only work for projects that use "detached MR pipelines" ([1]). Note that for it to actually work, a member with permission might have to go to the "pipeline" tab of the merge request and click "run pipeline". But this snippet is necessary for that. [1] https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg
* gitlab-ci: make tier tests automatic to simplify starting them manuallyThomas Haller2023-04-131-90/+90
| | | | | | | | | | | | | | | | | | | | | | | We want that the tier2+ tests are only run manually. As those tests depend on the respective prep step, there are 3 possibilities: 1) make prep manual and the tier test automatic. That is what we would want, because then we can just manually trigger the prep step (one click). However, in the past this didn't work. 2) make the prep automatic and the test manual. That works, the downside is that we often run the prep step when its not needed. This is what we used to do to workaround 1). 3) make prep and the test manual. Then there are no unnecessary tests run, but triggering a manual test is cumbersome. First click to start the prep step, then wait, then click again. Revisit this. It seems 1) is working now. Yeay. Also rename the prep stages, so that it's clear to which tier they belong. I guess, I could move them instead to prep1, prep2, prep3 stages, but then there are a lot of columns on the web site.
* gitlab-ci: extract base_type for distros to reduce redundant informationThomas Haller2023-04-131-5/+5
| | | | | | | | | | | The distro.name is not just a pretty name, its the name under which we fetch the container. It is thus a well-known name, that we can rely on. The "base_type" only depends on the distro name, and it makes no sense to ever choose a different name. Tracking it in the "distributions" array is thus redundant. Move the mapping of distro.name to the base type to a separate place.
* gitlab-ci: drop "tag"/"default_tag" from ci templatesThomas Haller2023-04-131-5/+5
| | | | | | | | | The tag we actually use already contains a hash of the input files and is generated (by `ci-fairy generate-templates`). There is no need for having this fixed prefix. As also seens by having a date there, which is maintained badly and meaningless. Drop it.
* gitlab-ci: rename "@container-prep" tests to "@prep"Thomas Haller2023-04-131-63/+63
| | | | | The long name looks verbose and takes away space on the web page. Shorten the name.
* gitlab-ci: use parallel:matrix for tier1 testsThomas Haller2023-04-131-7/+18
| | | | | | | | | | | | | | | | | | The benefit is that instead of one long running job for fedora:37 (the current tier1 test), we have several smaller. A minor downside is, that if the build is broken, then usually the very first test would already fail. Previously, that meant that the follow up tests were skipped. Now, they run all in parallel. However, test failures should be the exception, so the wasted resources are probably irrelevant. The upside is, that we can see which tests fail, and we run them much faster (in parallel). This is only done for the tier1 test, because those tests are started automatically. Other tiers need to be triggered manually, which already means a lot of clicking. Making those also matrix tests, would result in an insane amount of clicking. As those other tests are run much more seldom, having them huge is probably fine.
* gitlab-ci: add multiple stages/tiers for testsThomas Haller2023-04-131-162/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have many test configurations (i.e. distros like fedora:37, debian:9). Almost all of them run manually triggered, because running them every time would be wasteful. Still, even as we trigger those tests only seldom, whenever we trigger them all together, they consume still too many resources of the freedesktop.org gitlab infrastructure. One possibility would be to just drop old distros (e.g. fedora:30). Which tests are setup in gitlab-ci is constantly refined and adjusted. So dropping some distros is not necessarily wrong and bound to happen eventually. However, I also don't find it great to just disable tests that are still passing. If we want to avoid consuming too many resources, we can just choose not to run those tests. We don't need to enforce that by deleting tests. Once deleted, such a configuration cannot be tested anymore as it would be too cumbersome to recreate the setup manually. Instead, introduce stages/tiers to clearer mark configuration that we should test even less frequently. Note that it is still required from the developer to not trigger too many tests at once, to not monopolize the CI resources. The stages should make that clearer to see, but don't solve it. Deleting tests might solve it, but only if we delete a significant number of those tests, which seems not desirable.
* gitlab-ci: pass --break-system-packages to pip3 for the meson installPeter Hutterer2023-04-111-2/+2
| | | | | | | | | | | pip on Debian 12 semi-forces us to use a venv. That's hard enough but even more so when we just want to run meson which only relies on the standard library anyway. Since that flag doesn't exist on earlier versions, try both and hope one invocation succeeds. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1595
* contrib: avoid using "sudo" in REQUIRED_PACKAGES scriptsThomas Haller2023-02-081-4/+4
| | | | | It's often not installed, and usually we are already root. Avoid using sudo.
* gitlab-ci: fix CentOS Linux 9 containers during ".gitlab-ci/fedora-install.sh"Fernando Fernandez Mancera2023-01-241-2/+2
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1511
* gitlab-ci: bump ci-templates tag to generate new container imagesThomas Haller2023-01-181-5/+5
|
* gitlab-ci: ignore failure to install "python-setuptools" on debianThomas Haller2022-11-291-2/+2
| | | | | | | | | | | | | | | | python-setuptools is now gone from debian:testing ([1], [2]): Package python-setuptools is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'python-setuptools' has no installation candidate This package is entirely optional. Fix the failure by ignoring any failure to install the package. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=938168 [2] https://tracker.debian.org/news/1391360/python-setuptools-removed-from-testing/
* gitlab-ci: add comment about how to regenerate ".gitlab-ci.yml"Thomas Haller2022-11-291-5/+10
|
* gitlab-ci: update default Fedora image for building pages and check stepsThomas Haller2022-11-231-14/+14
| | | | | | | | We want to follow current Fedora, so update to f37. Also, we now use clang-format from Fedora 37 release, so the default image in gitlab-ci must match, because that image is used for the "check-tree" test.
* gitlab-ci: update to latest ci-templates versionThomas Haller2022-11-231-6/+6
|
* gitlab-ci: update ci-templates versionThomas Haller2022-10-111-6/+6
|
* gitlab-ci: enable F38 container and regenerate containersThomas Haller2022-10-111-5/+36
|
* gitlab-ci: fix unit tests on centos7 for python-pexpect dependencyThomas Haller2022-07-061-5/+5
| | | | Fixes: 9570224e86c4 ('tests/client: add a pexpect-based test runner')
* all: reformat with clang-format (clang-tools-extra-14.0.0-1.fc36) and update ↵Thomas Haller2022-07-061-14/+14
| | | | gitlab-ci to f36
* contrib/packages: install pexpectLubomir Rintel2022-06-301-5/+5
| | | | We'd like to use this for client unit testing.
* ci: trivial changes to commentsLubomir Rintel2022-06-271-1/+2
| | | | Hopefully for better not worse.
* ci: drop Ubuntu 16.04Lubomir Rintel2022-06-271-36/+5
| | | | | It's sad, old and unsupported. Also its gettext is old and smells of elderberries.
* gitlab-ci: regenerate imageslr/fix-debianLubomir Rintel2022-06-271-5/+5
|
* gitlab-ci: add f37 and Ubuntu 22.04 containersThomas Haller2022-05-301-5/+67
|
* gitlab-ci: use "nm-python-black-format.sh" script on "check-tree"Thomas Haller2022-04-011-6/+6
|
* gitlab-ci: fix archiving build logThomas Haller2022-03-301-7/+8
| | | | | | | | | | | | | | | During the test, we `tee` the output to a log file in "/tmp". We do that, because the test script cleans the working directory several times, so the file cannot reside there. Afterwards, we need to move the file back into the git-tree, so that gitlab can archive it. Previously that was done by "after_script", but the "after_script" may not see the same "/tmp" as the test run ([1]). This needs to be done as part of the "script" step. [1] https://docs.gitlab.com/ee/ci/yaml/#after_script
* gitlab-ci: rework extends: for "check-{patch,tree}" jobsThomas Haller2022-03-211-17/+17
| | | | | | | | | | | | The "check-{patch,tree}" jobs use the same container as the default test on Fedora ("pages_build", which also builds our documentation). Previously, we thus extended "t_fedora:35". But that way we also got things that we didn't want (.nm_artifacts and .build@template). Solve this differently, by letting the jobs directly define what they need. It's not much more, than extending "t_fedora:35" and workaround to drop stuff we don't want.
* gitlab-ci: archive log of testThomas Haller2022-03-211-7/+46
| | | | | | Our test is long and verbose. The output gets truncated after a few megabytes, but sometimes it's interesting to see what happens afterwards. Redirect also to a file and archive it.
* gitlab-ci: print environment variables not part of run-test.sh scriptThomas Haller2022-03-211-5/+6
| | | | | | | | | | | | | | The output of our test scripts is captured by gitlab. It does however sanitize things that look like secrets. So it was reasonably save to call `env` from within the test script. Next, we will redirect (`tee`) the output of the test script to a file and archive it. When we do that, the output does not get sanitized and can be downloaded from the artifacts page. Stop running `env` as part of the test script. Do it instead as a separate step. After all, it is useful to see the environment variables of the test. But sanitized.
* gitlab-ci: rename "build.sh" script to "run-test.sh"Thomas Haller2022-03-211-6/+6
| | | | | | | It's true, that our gitlab-ci test mostly consists of building NetworkManager. Hence the name of the script was not entirely wrong. But it's not only building. I think "run-test.sh" is a much better name. Rename.
* gitlab-ci: make "contrib/debian/REQUIRED_PACKAGES" verbose during container ↵Thomas Haller2022-03-161-2/+2
| | | | | | installation To help debugging the script.
* gitlab-ci: bump tag to regenerate containersThomas Haller2022-03-161-5/+5
|
* contrib: install "policykit-1" package on DebianThomas Haller2022-03-161-2/+2
| | | | | | | This is needed to get "/usr/share/gettext/its/polkit.its", otherwise msgfmt will fail on Debian: /usr/bin/msgfmt: cannot locate ITS rules for data/org.freedesktop.NetworkManager.policy.in
* Revert "gitlab-ci: disable CentOS 8 Linux containers"Thomas Haller2022-02-211-5/+95
| | | | | | | ci-templates now works around the earlier problem to install CentOS 8 Linux containers. Re-add the tests. This reverts commit b2d2b8d6fa05e6911c3a7599b35e38e149ddf873.
* gitlab-ci: update ci-templates versionThomas Haller2022-02-211-6/+6
| | | | | | | We need the latest fix to bootstrap CentOS 8 Linux containers. See-also: https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/131 See-also: https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/132
* gitlab-ci: fix CentOS Linux 8 containers during ".gitlab-ci/fedora-install.sh"Thomas Haller2022-02-211-2/+2
| | | | | 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/
* gitlab-ci: disable CentOS 8 Linux containersThomas Haller2022-02-141-95/+5
| | | | | | | | | | | | | | | | | | CentOS 8 Linux is end of life. That wouldn't bother us, but when you start such a container $ podman run -ti --privileged quay.io/centos/centos:8.3.2011 then `dnf upgrade` will fail, because the mirror list returns nothing. To work around that, we need to adjust ci-templates ([1]). The work around might be to patch /etc/yum.repos.d when creating the container image ([2]). For now (or maybe indefinitely) disable these build targets. [1] https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/131 [2] https://stackoverflow.com/questions/70926799/centos-through-vm-no-urls-in-mirrorlist
* gitlab-ci: regenerate ci-templates's containersThomas Haller2022-02-141-5/+5
|
* gitlab-ci: use Fedora 35 as default build targetThomas Haller2021-11-291-11/+11
|
* gitlab-ci: enable build on f35 and f36Thomas Haller2021-09-221-5/+65
| | | | | There was a problem that the containers didn't correctly build. That is now fixed. Reenable f35 and f36 (rawhide).
* gitlab-ci: update used ci-templates versionThomas Haller2021-09-221-6/+6
| | | | | It seems there is a problem building f35/f36 containers. Update the ci-templates version.
* gitlab-ci: drop fedora 28/29 from gitlab-ciThomas Haller2021-09-221-65/+5
| | | | | | These containers are ancient. Also, when we update ci-templates they will no longer build (because then a different container hub will be used, which doesn't contain those images). Drop them.
* contrib: explicitly pass "-n" to "nm-code-format.sh" in gitlab-ci check-tree jobThomas Haller2021-09-161-6/+6
| | | | | | "nm-code-format.sh" is going to change the default behavior from "-n" to "-i", that is, from check-only to reformat. Explicitly pass "-n" where we want it.
* gitlab-ci: fix regenerating .gitlab-ci.ymlThomas Haller2021-08-301-2/+2
| | | | Fixes: 414d2c1d4b3e ('contrib,gitlab-ci: fix "contrib/fedora/REQUIRED_PACKAGES" to install "vala"')
* gitlab-ci: temporarily disable Fedora 35 and 36Thomas Haller2021-08-301-65/+5
| | | | | | | | | | | | | | | | It fails to install the container. Disable it, until it is more stable. ... Install 363 Packages Total download size: 275 M Installed size: 1.1 G Downloading Packages: python3: allocatestack.c:191: advise_stack_range: Assertion `freesize < size' failed. ./contrib/fedora/REQUIRED_PACKAGES: line 17: 815 Aborted $NM_INSTALL "$@" subprocess exited with status 134 subprocess exited with status 134 exit status 134
* gitlab-ci: update which distros to buildThomas Haller2021-08-301-12/+102
|
* contrib: remove "vala-tools" from "contrib/fedora/REQUIRED_PACKAGES"Thomas Haller2021-08-301-2/+2
| | | | | | | Since Fedora 25, vala-tools was merged with "vala" package. And on rawhide (f36) it's gone completely and leads to a failure of the script. Drop it.
* gitlab-ci: regenerate ci-templates's containersThomas Haller2021-07-211-5/+5
|
* gitlab-ci: regenerate ci-templates's containersThomas Haller2021-07-121-5/+5
|