Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ test_env.install_cli:

test_env.container_prepare:
apt-get -y install git build-essential netcat-traditional
git config --global --add safe.directory /app || true
git config --global --add safe.directory /app/apps/codecov-api || true

test_env.container_check_db:
while ! nc -vz postgres 5432; do sleep 1; echo "waiting for postgres"; done
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- redis
- timescale
volumes:
- ./:/app
- ./:/app/apps/codecov-api
- ./docker/test.yml:/config/codecov.yml
entrypoint:
- ./dev.sh
Expand Down
32 changes: 16 additions & 16 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ARG BERGLAS_VERSION=2.0.6
FROM us-docker.pkg.dev/berglas/berglas/berglas:$BERGLAS_VERSION as berglas

FROM $REQUIREMENTS_IMAGE as app
COPY . /app
WORKDIR /app
COPY . /app/apps/codecov-api
WORKDIR /app/apps/codecov-api
RUN pip install setuptools==71.1.0
RUN python manage.py collectstatic --no-input

Expand All @@ -25,27 +25,27 @@ RUN pip uninstall -y typing
ENV DJANGO_SETTINGS_MODULE="codecov.settings_enterprise"
# Remove the settings dev and enterprise files.
# These should *never* make it to enterprise.
RUN rm /app/codecov/settings_dev.py && \
rm /app/codecov/settings_prod.py && \
rm /app/codecov/settings_test.py && \
rm /app/codecov/settings_staging.py && \
rm /app/dev.sh && \
rm /app/migrate.sh && \
rm /app/prod.sh && \
rm /app/staging.sh && \
rm /app/production.yml && \
rm /app/development.yml
RUN rm /app/apps/codecov-api/codecov/settings_dev.py && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: might be worth adding a const or something for this value to explain what it is

rm /app/apps/codecov-api/codecov/settings_prod.py && \
rm /app/apps/codecov-api/codecov/settings_test.py && \
rm /app/apps/codecov-api/codecov/settings_staging.py && \
rm /app/apps/codecov-api/dev.sh && \
rm /app/apps/codecov-api/migrate.sh && \
rm /app/apps/codecov-api/prod.sh && \
rm /app/apps/codecov-api/staging.sh && \
rm /app/apps/codecov-api/production.yml && \
rm /app/apps/codecov-api/development.yml
# Remove unneeded folders
RUN rm -rf /app/.github
RUN rm -rf /app/.circleci
RUN rm -rf /app/apps/codecov-api/.github
RUN rm -rf /app/apps/codecov-api/.circleci
# Create the codecov user to run the container as
RUN addgroup --system application \
&& adduser --system codecov --ingroup application --home /home/codecov
RUN mkdir -p /config && chown codecov:application /config
# copy the enterprise settings module.
WORKDIR /app
WORKDIR /app/apps/codecov-api
RUN chmod +x enterprise.sh && \
chown codecov:application /app
chown codecov:application /app/apps/codecov-api
ARG RELEASE_VERSION
ENV RUN_ENV="ENTERPRISE"
ENV RELEASE_VERSION=$RELEASE_VERSION
Expand Down