Merge branch 'add-zoekt-ci-image' into 'master'

Add zoekt-ci-image

See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/624

Merged-by: Rémy Coutable <remy@rymai.me>
Approved-by: Rémy Coutable <remy@rymai.me>
Reviewed-by: Rémy Coutable <remy@rymai.me>
Co-authored-by: Dylan Griffith <dyl.griffith@gmail.com>
This commit is contained in:
Rémy Coutable 2023-01-24 16:06:43 +00:00
commit 7872ef28c3
3 changed files with 24 additions and 0 deletions

View file

@ -67,3 +67,6 @@ alpine-bash-jq-curl-git:
# Used by frontend related tasks for linting GraphQL
apollo:
extends: .build_and_deploy
zoekt-ci-image:
extends: .build_and_deploy

16
Dockerfile.zoekt-ci-image Normal file
View file

@ -0,0 +1,16 @@
FROM golang:1.19
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y universal-ctags git
RUN git clone https://github.com/DylanGriffith/zoekt.git
RUN cd /usr/src/app/zoekt && git checkout dynamic-indexserver-api && go install github.com/sourcegraph/zoekt/cmd/zoekt-dynamic-indexserver && go install github.com/sourcegraph/zoekt/cmd/zoekt-git-clone && go install github.com/sourcegraph/zoekt/cmd/zoekt-git-index
RUN cd /usr/src/app/zoekt && git checkout search-api-with-reposbranches-filter && go install github.com/sourcegraph/zoekt/cmd/zoekt-webserver
COPY assets/zoekt-ci-image/run-zoekt-servers run-zoekt-servers
EXPOSE 6060
EXPOSE 6070
CMD ["sh", "run-zoekt-servers"]

View file

@ -0,0 +1,5 @@
#!/bin/sh -e
zoekt-dynamic-indexserver -data_dir zoekt/test/data -index_dir zoekt/test/index -dynamic_server -listen :6060 &
zoekt-webserver -index zoekt/test/index -rpc -listen :6070