nixos/gitlab: Warn users who are still using an external registry

This adds a warning for GitLab >=16.0.0 users who are still using an
external container registry such as `pkgs.docker-distribution`. Support
for external container registries has ended in GitLab 16.0 [1] and is
scheduled for removal in a future release. [2]

[1]: https://gitlab.com/gitlab-org/gitlab/-/issues/376217
[2]: https://gitlab.com/gitlab-org/gitlab/-/issues/403322
This commit is contained in:
Yaya 2023-05-30 09:20:18 +00:00 committed by Yureka
parent 014816cbe4
commit e9594e6031

View file

@ -1081,6 +1081,13 @@ in {
};
config = mkIf cfg.enable {
warnings = [
(mkIf
(cfg.registry.enable && versionAtLeast (getVersion cfg.packages.gitlab) "16.0.0" && cfg.registry.package == pkgs.docker-distribution)
''Support for container registries other than gitlab-container-registry has ended since GitLab 16.0.0 and is scheduled for removal in a future release.
Please back up your data and migrate to the gitlab-container-registry package.''
)
];
assertions = [
{