Skip to content

Commit def6033

Browse files
committed
Force kaniko cache invalidation on PLAYGROUND_SANDBOX value
1 parent ccd7d62 commit def6033

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ RUN npx lerna run build --scope lit-dev-api --stream && \
4444
# Site content
4545
COPY packages/lit-dev-content/ ./packages/lit-dev-content/
4646
ARG PLAYGROUND_SANDBOX
47+
# Kaniko doesn't include ARG values in the layer cache key. This is different to
48+
# normal Docker behavior, which would invalidate anything after the ARG
49+
# declaration if the value changes. So, we need to write it to the file system
50+
# to force a cache invalidation. Otherwise, we might re-use the most recent
51+
# Eleventy build output, even when the playground sandbox URL has changed.
52+
RUN "cat $PLAYGROUND_SANDBOX > playground-sandbox"
4753
RUN npx lerna run build --scope lit-dev-content --stream
4854

4955
# Run the web service on container startup.

0 commit comments

Comments
 (0)