From 08da48617de02d14c7c0f8777504c6efa53b2150 Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Thu, 6 Jul 2023 10:35:54 -0500 Subject: [PATCH] Fix CI user's PATH to include pip-installed executables (#2245) --- .ci/Dockerfile | 1 + .ci/run-repository.sh | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/Dockerfile b/.ci/Dockerfile index 5dd66877c..569de2e05 100644 --- a/.ci/Dockerfile +++ b/.ci/Dockerfile @@ -7,6 +7,7 @@ ARG BUILDER_UID=1000 ARG BUILDER_GID=1000 ENV BUILDER_USER elastic ENV BUILDER_GROUP elastic +ENV PATH="${PATH}:/var/lib/elastic/.local/bin" # Create user RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \ diff --git a/.ci/run-repository.sh b/.ci/run-repository.sh index 2a90c1c1c..7a5b5b9e1 100755 --- a/.ci/run-repository.sh +++ b/.ci/run-repository.sh @@ -26,14 +26,16 @@ echo -e "\033[1m>>>>> Build [elastic/elasticsearch-py container] >>>>>>>>>>>>>>> docker build \ --file .ci/Dockerfile \ --tag elastic/elasticsearch-py \ - --build-arg PYTHON_VERSION=${PYTHON_VERSION} \ + --build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \ + --build-arg "BUILDER_UID=$(id -u)" \ + --build-arg "BUILDER_GID=$(id -g)" \ . echo -e "\033[1m>>>>> Run [elastic/elasticsearch-py container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" mkdir -p junit docker run \ - -u "$(id -u)" \ + -u "$(id -u):$(id -g)" \ --network=${network_name} \ --env "STACK_VERSION=${STACK_VERSION}" \ --env "ELASTICSEARCH_URL=${elasticsearch_url}" \