diff --git a/playbooks/openshift-apps/fasjson.yml b/playbooks/openshift-apps/fasjson.yml index bd62e7dbaf..8750472e0c 100644 --- a/playbooks/openshift-apps/fasjson.yml +++ b/playbooks/openshift-apps/fasjson.yml @@ -10,6 +10,12 @@ vars: + pre_tasks: + - name: create a file with random content to prevent docker from caching the git clone + copy: + dest: /etc/openshift_apps/fasjson/random-file + content: "{{ now() }}" + roles: - role: openshift/project app: fasjson diff --git a/roles/openshift-apps/fasjson/templates/Dockerfile b/roles/openshift-apps/fasjson/templates/Dockerfile index d57445e9fa..70d270c371 100644 --- a/roles/openshift-apps/fasjson/templates/Dockerfile +++ b/roles/openshift-apps/fasjson/templates/Dockerfile @@ -28,6 +28,9 @@ RUN dnf install -y \ python3-wheel && \ dnf autoremove -y && \ dnf clean all -y +# Add a file with random content to prevent Docker from caching the git clone step. +COPY random-file +RUN rm -f random-file RUN git clone https://github.com/fedora-infra/fasjson.git && \ pushd fasjson && \ git checkout {{ (env == 'production')|ternary('stable', 'staging') }} && \