gitlab-kas: init at 18.6.3

This commit is contained in:
Leona Maroni
2026-01-13 11:40:46 +01:00
parent ccfbb9cd58
commit f2b1f5dbd2
3 changed files with 58 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
{
buildGoModule,
lib,
fetchFromGitLab,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "gitlab-kas";
version = "18.6.3";
# nixpkgs-update: no auto update
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "cluster-integration/gitlab-agent";
tag = "v${finalAttrs.version}";
hash = "sha256-crKzUQ+51hRgQsICES4tULyrRFw+hjWN9jz+lxYjtew=";
};
vendorHash = "sha256-SSxQH45CVg1v8PKkbU046bAZsZOOPN5U7Cm81n82uRA=";
subPackages = [ "./cmd/kas" ];
ldflags =
let
goPkgPath = "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v${lib.versions.major finalAttrs.version}";
in
[
"-X ${goPkgPath}/internal/cmd.Version=${finalAttrs.version}"
"-X ${goPkgPath}/internal/cmd.GitRef=v${finalAttrs.version}"
];
nativeInstallCheckHooks = [
versionCheckHook
];
meta = {
description = "Kubernetes Agent (Gitlab side)";
mainProgram = "kas";
homepage = "https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent";
changelog = "https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [
lib.maintainers.leona
];
};
})
+1
View File
@@ -8,6 +8,7 @@
"rev": "v18.6.3-ee",
"passthru": {
"GITALY_SERVER_VERSION": "18.6.3",
"GITLAB_KAS_VERSION": "18.6.3",
"GITLAB_PAGES_VERSION": "18.6.3",
"GITLAB_SHELL_VERSION": "14.45.3",
"GITLAB_ELASTICSEARCH_INDEXER_VERSION": "5.10.1",
+11
View File
@@ -101,6 +101,7 @@ class GitLabRepo:
v: self.get_file(v, rev).strip()
for v in [
"GITALY_SERVER_VERSION",
"GITLAB_KAS_VERSION",
"GITLAB_PAGES_VERSION",
"GITLAB_SHELL_VERSION",
"GITLAB_ELASTICSEARCH_INDEXER_VERSION",
@@ -273,6 +274,15 @@ def update_gitlab_pages():
_call_nix_update("gitlab-pages", gitlab_pages_version)
@cli.command("update-gitlab-kas")
def update_gitlab_kas():
"""Update gitlab-kas"""
logger.info("Updating gitlab-kas")
data = _get_data_json()
gitlab_kas_version = data["passthru"]["GITLAB_KAS_VERSION"]
_call_nix_update("gitlab-kas", gitlab_kas_version)
def get_container_registry_version() -> str:
"""Returns the version attribute of gitlab-container-registry"""
return subprocess.check_output(
@@ -405,6 +415,7 @@ def commit_gitlab(old_version: str, new_version: str, new_rev: str) -> None:
"pkgs/by-name/gi/gitlab",
"pkgs/by-name/gi/gitaly",
"pkgs/by-name/gi/gitlab-elasticsearch-indexer",
"pkgs/by-name/gi/gitlab-kas",
"pkgs/by-name/gi/gitlab-pages",
],
cwd=NIXPKGS_PATH,