From 3a8c6f6c805b89281c473446d2ac32ba9e746048 Mon Sep 17 00:00:00 2001 From: Celes Renata Date: Fri, 1 May 2026 23:23:49 +0000 Subject: [PATCH] fix: add CACHE_BUST ARG to Dockerfile + build args to force fresh COPY layers per commit --- .woodpecker/build-1.yml | 12 +++++++++--- .woodpecker/build-2.yml | 16 ++++++++++++---- .woodpecker/build-3.yml | 16 ++++++++++++---- docker/Dockerfile | 1 + 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/.woodpecker/build-1.yml b/.woodpecker/build-1.yml index e5e0a59..425b673 100644 --- a/.woodpecker/build-1.yml +++ b/.woodpecker/build-1.yml @@ -65,7 +65,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 backend_options: kubernetes: resources: @@ -102,7 +104,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.ingestion.worker + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.ingestion.worker backend_options: kubernetes: resources: @@ -139,7 +143,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.parser.worker + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.parser.worker backend_options: kubernetes: resources: diff --git a/.woodpecker/build-2.yml b/.woodpecker/build-2.yml index ff47cdb..7dde163 100644 --- a/.woodpecker/build-2.yml +++ b/.woodpecker/build-2.yml @@ -30,7 +30,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.extractor.worker + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.extractor.worker backend_options: kubernetes: resources: @@ -67,7 +69,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.aggregation.worker + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.aggregation.worker backend_options: kubernetes: resources: @@ -104,7 +108,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.recommendation.worker + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.recommendation.worker backend_options: kubernetes: resources: @@ -141,7 +147,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 backend_options: kubernetes: resources: diff --git a/.woodpecker/build-3.yml b/.woodpecker/build-3.yml index 6f111e2..d238d79 100644 --- a/.woodpecker/build-3.yml +++ b/.woodpecker/build-3.yml @@ -30,7 +30,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.adapters.broker_adapter + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.adapters.broker_adapter backend_options: kubernetes: resources: @@ -67,7 +69,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=python -m services.lake_publisher.worker + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=python -m services.lake_publisher.worker backend_options: kubernetes: resources: @@ -104,7 +108,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=uvicorn services.api.app:app --host 0.0.0.0 --port 8000 + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=uvicorn services.api.app:app --host 0.0.0.0 --port 8000 backend_options: kubernetes: resources: @@ -141,7 +147,9 @@ steps: dockerfile: docker/Dockerfile no_cache: true context: . - build_args: SERVICE_CMD=uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 + build_args: + - CACHE_BUST=${CI_COMMIT_SHA} + - SERVICE_CMD=uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 backend_options: kubernetes: resources: diff --git a/docker/Dockerfile b/docker/Dockerfile index 2c77d22..81e7f5b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,6 +16,7 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt +ARG CACHE_BUST COPY services/ /app/services/ COPY scripts/ /app/scripts/ COPY tests/ /app/tests/