diff --git a/roles/openshift-apps/fasjson/templates/Dockerfile b/roles/openshift-apps/fasjson/templates/Dockerfile index 96979ed27a..d57445e9fa 100644 --- a/roles/openshift-apps/fasjson/templates/Dockerfile +++ b/roles/openshift-apps/fasjson/templates/Dockerfile @@ -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') }} && \ diff --git a/roles/openshift-apps/fasjson/templates/buildconfig.yml b/roles/openshift-apps/fasjson/templates/buildconfig.yml index 301a8b2313..0d494b00bd 100644 --- a/roles/openshift-apps/fasjson/templates/buildconfig.yml +++ b/roles/openshift-apps/fasjson/templates/buildconfig.yml @@ -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 diff --git a/roles/openshift-apps/ipsilon/templates/buildconfig.yml b/roles/openshift-apps/ipsilon/templates/buildconfig.yml index b8b37f17e1..063fa2a844 100644 --- a/roles/openshift-apps/ipsilon/templates/buildconfig.yml +++ b/roles/openshift-apps/ipsilon/templates/buildconfig.yml @@ -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