Skip to content

Commit

Permalink
fix: bust cache on processing image rebuild workflow only (#7044)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayib-jose-gloria authored May 16, 2024
1 parent c964f6f commit 34d3f55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rebuild-processing-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
shell: bash
run: |
export BRANCH_SHA=$(git rev-parse --short=8 HEAD)
# Cache busting to ensure the image is always rebuilt.
export CACHEBUST=$(date +%s)
happy push "" --aws-profile "" --tag sha-${BRANCH_SHA} --slice processing
- name: Alert in Slack
uses: 8398a7/action-slack@v3
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.processing
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ ENV PATH="/opt/venv/bin:$PATH"
COPY /python_dependencies/processing/ .
COPY /python_dependencies/common/ .
ARG INSTALL_DEV=false

ARG CACHEBUST=1
RUN python3.10 -m pip install -r requirements.txt

RUN if [ "$INSTALL_DEV" = "true" ]; then python3 -m pip install -r requirements-dev.txt; fi

ADD backend/__init__.py backend/__init__.py
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ services:
- HAPPY_BRANCH=$HAPPY_BRANCH
- INSTALL_DEV=$INSTALL_DEV
- HAPPY_TAG
- CACHEBUST=$CACHEBUST
restart: "no"
volumes:
- ./backend/portal/pipeline/processing:/backend/portal/pipeline/processing
Expand Down

0 comments on commit 34d3f55

Please sign in to comment.