Skip to content
Snippets Groups Projects
Commit 8baf899b authored by Simon Künzel's avatar Simon Künzel
Browse files

!fixup Add package caching for CI

parent b33e31ec
Branches
Tags
No related merge requests found
ARG PIP_CACHE_DIR
# Can be "development" or "production"
ARG ENV_TYPE
ARG GIT_COMMIT_SHA
FROM registry.git.fsmpi.rwth-aachen.de/videoag/backend/${ENV_TYPE}_common_py:${GIT_COMMIT_SHA}
ARG PIP_CACHE_DIR
RUN echo ${PIP_CACHE_DIR}
ENV VIDEOAG_API_GIT_COMMIT_HASH $GIT_COMMIT_SHA
COPY extra_requirements.txt ./
......
ARG PIP_CACHE_DIR
FROM python:3.12
ARG PIP_CACHE_DIR
WORKDIR /code
RUN mkdir -p /code
......
......@@ -92,6 +92,8 @@ echo "{\\"auths\\":{\\"$CI_REGISTRY\\":{\\"username\\":\\"$CI_REGISTRY_USER\\",\
f"--destination=$CI_REGISTRY_IMAGE/{self.versioned_full_name()}",
f"--build-arg=GIT_COMMIT_SHA={self.context.commit_sha}",
f"--build-arg=ENV_TYPE={self.context.env_type()}",
# See https://github.com/GoogleContainerTools/kaniko/issues/969#issuecomment-2160910028
f"--build-arg=PIP_CACHE_DIR=$CI_PROJECT_DIR/.cache/pip",
f"--cache=true",
]
......
ARG PIP_CACHE_DIR
# Can be "development" or "production"
ARG ENV_TYPE
ARG GIT_COMMIT_SHA
FROM registry.git.fsmpi.rwth-aachen.de/videoag/backend/${ENV_TYPE}_common_py:${GIT_COMMIT_SHA}
ARG PIP_CACHE_DIR
# Empty by default
ARG GIT_COMMIT_TAG=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment