From 11a65cab712d915326bdd1b682c9d506521f175a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Thu, 17 Sep 2020 11:51:45 +0200 Subject: [PATCH] Better way to do the same thing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- playbooks/openshift-apps/fasjson.yml | 6 ------ roles/openshift-apps/fasjson/templates/Dockerfile | 5 ++--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/playbooks/openshift-apps/fasjson.yml b/playbooks/openshift-apps/fasjson.yml index 8750472e0c..bd62e7dbaf 100644 --- a/playbooks/openshift-apps/fasjson.yml +++ b/playbooks/openshift-apps/fasjson.yml @@ -10,12 +10,6 @@ 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 70d270c371..96979ed27a 100644 --- a/roles/openshift-apps/fasjson/templates/Dockerfile +++ b/roles/openshift-apps/fasjson/templates/Dockerfile @@ -28,9 +28,8 @@ 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 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') }} && \