mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-11 10:32:27 +08:00
Don't cache Docker builds when they use git clone
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
@@ -28,8 +28,6 @@ RUN dnf install -y \
|
||||
python3-wheel && \
|
||||
dnf autoremove -y && \
|
||||
dnf clean all -y
|
||||
# Run a command with random content to prevent Docker from caching the git clone step.
|
||||
RUN echo {{ now() }}
|
||||
RUN git clone https://github.com/fedora-infra/fasjson.git && \
|
||||
pushd fasjson && \
|
||||
git checkout {{ (env == 'production')|ternary('stable', 'staging') }} && \
|
||||
|
||||
@@ -14,6 +14,9 @@ spec:
|
||||
{{ load_file('Dockerfile') | indent(6) }}
|
||||
strategy:
|
||||
type: Docker
|
||||
dockerStrategy:
|
||||
# Prevent Docker from caching the git clone step in the Dockerfile
|
||||
noCache: true
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
|
||||
@@ -13,6 +13,9 @@ spec:
|
||||
{{ load_file('Dockerfile') | indent(6) }}
|
||||
strategy:
|
||||
type: Docker
|
||||
dockerStrategy:
|
||||
# Prevent Docker from caching the git clone step in the Dockerfile
|
||||
noCache: true
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
|
||||
Reference in New Issue
Block a user