Loading nixos/modules/services/misc/gitlab.nix +1 −0 Original line number Diff line number Diff line Loading @@ -1296,6 +1296,7 @@ in ConditionPathExists = "!${cfg.registry.certFile}"; }; serviceConfig = { Type = "oneshot"; Slice = "system-gitlab.slice"; }; }; Loading nixos/tests/gitlab.nix +24 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,10 @@ in environment.systemPackages = with pkgs; [ git ]; networking.hosts."127.0.0.1" = [ "registry.localhost" "pages.localhost" ]; virtualisation.memorySize = 6144; virtualisation.cores = 4; virtualisation.useNixStoreImage = true; Loading @@ -59,6 +63,12 @@ in localhost = { locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket"; }; "pages.localhost" = { locations."/".proxyPass = "http://localhost:8090"; }; "registry.localhost" = { locations."/".proxyPass = "http://localhost:4567"; }; }; }; Loading @@ -78,7 +88,7 @@ in smtp.enable = true; pages = { enable = true; settings.pages-domain = "localhost"; settings.pages-domain = "pages.localhost"; }; extraConfig = { incoming_email = { Loading @@ -98,6 +108,14 @@ in jwsFile = pkgs.runCommand "oidcKeyBase" { } "${pkgs.openssl}/bin/openssl genrsa 2048 > $out"; }; registry = { enable = true; certFile = "/var/lib/gitlab/registry_auth_cert"; keyFile = "/var/lib/gitlab/registry_auth_key"; externalAddress = "registry.localhost"; externalPort = 443; }; # reduce memory usage sidekiq.concurrency = 1; puma.workers = 2; Loading Loading @@ -210,6 +228,7 @@ in gitlab.wait_for_unit("gitlab-sidekiq.service") gitlab.wait_for_file("${nodes.gitlab.services.gitlab.statePath}/tmp/sockets/gitlab.socket") gitlab.wait_until_succeeds("curl -sSf http://gitlab/users/sign_in") gitlab.wait_for_unit("docker-registry.service") ''; # The actual test of GitLab. Only push data to GitLab if Loading Loading @@ -447,6 +466,10 @@ in """ ) gitlab.succeed("test -s /tmp/archive.tar.bz2") '' + '' with subtest("Test docker registry http is available"): gitlab.succeed("curl -sSf http://registry.localhost") ''; in Loading Loading
nixos/modules/services/misc/gitlab.nix +1 −0 Original line number Diff line number Diff line Loading @@ -1296,6 +1296,7 @@ in ConditionPathExists = "!${cfg.registry.certFile}"; }; serviceConfig = { Type = "oneshot"; Slice = "system-gitlab.slice"; }; }; Loading
nixos/tests/gitlab.nix +24 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,10 @@ in environment.systemPackages = with pkgs; [ git ]; networking.hosts."127.0.0.1" = [ "registry.localhost" "pages.localhost" ]; virtualisation.memorySize = 6144; virtualisation.cores = 4; virtualisation.useNixStoreImage = true; Loading @@ -59,6 +63,12 @@ in localhost = { locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket"; }; "pages.localhost" = { locations."/".proxyPass = "http://localhost:8090"; }; "registry.localhost" = { locations."/".proxyPass = "http://localhost:4567"; }; }; }; Loading @@ -78,7 +88,7 @@ in smtp.enable = true; pages = { enable = true; settings.pages-domain = "localhost"; settings.pages-domain = "pages.localhost"; }; extraConfig = { incoming_email = { Loading @@ -98,6 +108,14 @@ in jwsFile = pkgs.runCommand "oidcKeyBase" { } "${pkgs.openssl}/bin/openssl genrsa 2048 > $out"; }; registry = { enable = true; certFile = "/var/lib/gitlab/registry_auth_cert"; keyFile = "/var/lib/gitlab/registry_auth_key"; externalAddress = "registry.localhost"; externalPort = 443; }; # reduce memory usage sidekiq.concurrency = 1; puma.workers = 2; Loading Loading @@ -210,6 +228,7 @@ in gitlab.wait_for_unit("gitlab-sidekiq.service") gitlab.wait_for_file("${nodes.gitlab.services.gitlab.statePath}/tmp/sockets/gitlab.socket") gitlab.wait_until_succeeds("curl -sSf http://gitlab/users/sign_in") gitlab.wait_for_unit("docker-registry.service") ''; # The actual test of GitLab. Only push data to GitLab if Loading Loading @@ -447,6 +466,10 @@ in """ ) gitlab.succeed("test -s /tmp/archive.tar.bz2") '' + '' with subtest("Test docker registry http is available"): gitlab.succeed("curl -sSf http://registry.localhost") ''; in Loading