Skip to content

Use make for zoekt-indexer

Dmitry Gruzd requested to merge 421288-zoekt-indexer-use-make into master

What does this MR do?

We've added the -version argument to gitlab-zoekt-indexer in gitlab-org/gitlab-zoekt-indexer!25 (merged), but it only works properly when you use make. This MR switches build from go build to make to fix -version output.

Before

$ /bin/gitlab-zoekt-indexer -version
/bin/gitlab-zoekt-indexer dev (built at: )

After

$ /bin/gitlab-zoekt-indexer -version
/bin/gitlab-zoekt-indexer 2023.08.08-e790f4b (built at: 2023-08-08 11:13 UTC)

How to test it

  1. Checkout master
  2. docker build -t registry.gitlab.com/gitlab-org/build/cng/gitlab-zoekt-indexer:master -f gitlab-zoekt-indexer/Dockerfile gitlab-zoekt-indexer
  3. Verify that docker run --rm registry.gitlab.com/gitlab-org/build/cng/gitlab-zoekt-indexer:master /bin/gitlab-zoekt-indexer -version returns incomplete version
  4. Checkout this branch 421288-zoekt-indexer-use-make
  5. Rebuild the image docker build -t registry.gitlab.com/gitlab-org/build/cng/gitlab-zoekt-indexer:master -f gitlab-zoekt-indexer/Dockerfile gitlab-zoekt-indexer
  6. Verify that docker run --rm registry.gitlab.com/gitlab-org/build/cng/gitlab-zoekt-indexer:master /bin/gitlab-zoekt-indexer -version now returns full version with SHA

Related issues

Closes gitlab-org/gitlab#421288 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Integration tests added to GitLab QA
  • The impact any change in container size has should be evaluated
  • New dependencies are managed with dependencies.io
Edited by Dmitry Gruzd

Merge request reports