From 501e5071d97051d1d3eb724b5313dc1cb22d51f4 Mon Sep 17 00:00:00 2001 From: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com> Date: Tue, 20 Jun 2023 13:24:29 -0400 Subject: [PATCH] Copy scip-ctags in search-indexer Dockerfile (#53770) Modified Bazel/wolfi configuration to copy scip-ctags for the search-indexer (zoekt) image. ## Test plan Generated search-indexer image contains scip-ctags in expected place. --------- Co-authored-by: Will Dollman --- docker-images/search-indexer/BUILD.bazel | 11 ++++++++++- docker-images/search-indexer/Dockerfile.wolfi | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docker-images/search-indexer/BUILD.bazel b/docker-images/search-indexer/BUILD.bazel index a3a2a9bde2b1..a41dac1bf15d 100644 --- a/docker-images/search-indexer/BUILD.bazel +++ b/docker-images/search-indexer/BUILD.bazel @@ -1,6 +1,7 @@ load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push", "oci_tarball") load("//cmd/server:macro.bzl", "container_dependencies", "dependencies_tars") load("//dev:oci_defs.bzl", "image_repository") +load("@rules_pkg//:pkg.bzl", "pkg_tar") load("@container_structure_test//:defs.bzl", "container_structure_test") DEPS = [ @@ -13,6 +14,12 @@ DEPS = [ container_dependencies(DEPS) +pkg_tar( + name = "tar_scip-ctags", + srcs = ["//docker-images/syntax-highlighter:scip-ctags"], + package_dir = "/usr/local/bin", +) + oci_image( name = "image", base = "@wolfi_search_indexer_base", @@ -25,7 +32,9 @@ oci_image( "DATA_DIR": "/data/index", "SRC_FRONTEND_INTERNAL": "http://sourcegraph-frontend-internal", }, - tars = dependencies_tars(DEPS), + tars = [ + ":tar_scip-ctags", + ] + dependencies_tars(DEPS), user = "sourcegraph", workdir = "/home/sourcegraph", ) diff --git a/docker-images/search-indexer/Dockerfile.wolfi b/docker-images/search-indexer/Dockerfile.wolfi index 654ab527d2c4..48ed8703a706 100644 --- a/docker-images/search-indexer/Dockerfile.wolfi +++ b/docker-images/search-indexer/Dockerfile.wolfi @@ -23,6 +23,7 @@ USER sourcegraph WORKDIR /home/sourcegraph COPY --from=zoekt_upstream \ + /usr/local/bin/scip-ctags \ /usr/local/bin/zoekt-sourcegraph-indexserver \ /usr/local/bin/zoekt-archive-index \ /usr/local/bin/zoekt-git-index \