about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorAlexander Sieg <alex@xanderio.de>2023-03-09 11:55:48 +0100
committerYureka <yuka@yuka.dev>2023-07-05 15:01:31 +0200
commitf241d5fbd9366dd5368042629a98360eea82fb30 (patch)
treeb07ecda67fc5750b3cdffd04d2d76c61a4321c1d /pkgs/applications
parent2c9efde7ffcd6f4c312ec5e2469afc5707b7e406 (diff)
gitlab-elasticsearch-indexer: init at 4.3.5
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/version-management/gitlab/data.json1
-rw-r--r--pkgs/applications/version-management/gitlab/gitlab-elasticsearch-indexer/default.nix24
-rwxr-xr-xpkgs/applications/version-management/gitlab/update.py12
3 files changed, 36 insertions, 1 deletions
diff --git a/pkgs/applications/version-management/gitlab/data.json b/pkgs/applications/version-management/gitlab/data.json
index 737125e864be1..7b4ababdcdca8 100644
--- a/pkgs/applications/version-management/gitlab/data.json
+++ b/pkgs/applications/version-management/gitlab/data.json
@@ -9,6 +9,7 @@
     "GITALY_SERVER_VERSION": "16.1.2",
     "GITLAB_PAGES_VERSION": "16.1.2",
     "GITLAB_SHELL_VERSION": "14.23.0",
+    "GITLAB_ELASTICSEARCH_INDEXER_VERSION": "4.3.5",
     "GITLAB_WORKHORSE_VERSION": "16.1.2"
   }
 }
diff --git a/pkgs/applications/version-management/gitlab/gitlab-elasticsearch-indexer/default.nix b/pkgs/applications/version-management/gitlab/gitlab-elasticsearch-indexer/default.nix
new file mode 100644
index 0000000000000..a52a9a7538481
--- /dev/null
+++ b/pkgs/applications/version-management/gitlab/gitlab-elasticsearch-indexer/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildGoModule, fetchFromGitLab, pkg-config, icu }:
+
+buildGoModule rec {
+  pname = "gitlab-elasticsearch-indexer";
+  version = "4.3.5";
+
+  src = fetchFromGitLab {
+    owner = "gitlab-org";
+    repo = "gitlab-elasticsearch-indexer";
+    rev = "v${version}";
+    sha256 = "sha256-2idvN92H4Cc1W71gADrsuUl3+f2weAvL2MOP19NO/3I=";
+  };
+
+  vendorHash = "sha256-7LqzuBVYqpPI2thIJu4kQgCZGMlBlKI8L+j7AdUYrgQ=";
+
+  buildInputs = [ icu ];
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "Indexes Git repositories into Elasticsearch for GitLab.";
+    license = licenses.mit;
+    maintainers = with maintainers; [ xanderio yayayayaka ];
+  };
+}
diff --git a/pkgs/applications/version-management/gitlab/update.py b/pkgs/applications/version-management/gitlab/update.py
index 1abdd9bde0df5..3df024b2c0431 100755
--- a/pkgs/applications/version-management/gitlab/update.py
+++ b/pkgs/applications/version-management/gitlab/update.py
@@ -109,9 +109,9 @@ class GitLabRepo:
                 "GITALY_SERVER_VERSION",
                 "GITLAB_PAGES_VERSION",
                 "GITLAB_SHELL_VERSION",
+                "GITLAB_ELASTICSEARCH_INDEXER_VERSION",
             ]
         }
-
         passthru["GITLAB_WORKHORSE_VERSION"] = version
 
         return dict(
@@ -297,6 +297,14 @@ def update_gitlab_container_registry(rev: str, commit: bool):
         )
 
 
+@cli.command('update-gitlab-elasticsearch-indexer')
+def update_gitlab_elasticsearch_indexer():
+    """Update gitlab-elasticsearch-indexer"""
+    data = _get_data_json()
+    gitlab_elasticsearch_indexer_version = data['passthru']['GITLAB_ELASTICSEARCH_INDEXER_VERSION']
+    _call_nix_update('gitlab-elasticsearch-indexer', gitlab_elasticsearch_indexer_version)
+
+
 @cli.command("update-all")
 @click.option("--rev", default="latest", help="The rev to use (vX.Y.Z-ee), or 'latest'")
 @click.option(
@@ -317,6 +325,7 @@ def update_all(ctx, rev: str, commit: bool):
     ctx.invoke(update_gitlab_pages)
     ctx.invoke(update_gitlab_shell)
     ctx.invoke(update_gitlab_workhorse)
+    ctx.invoke(update_gitlab_elasticsearch_indexer)
     if commit:
         commit_gitlab(
             old_data_json["version"], new_data_json["version"], new_data_json["rev"]
@@ -342,6 +351,7 @@ def commit_gitlab(old_version: str, new_version: str, new_rev: str) -> None:
             "gitlab-pages",
             "gitlab-shell",
             "gitlab-workhorse",
+            "gitlab-elasticsearch-indexer",
         ],
         cwd=GITLAB_DIR,
     )