Better way to do the same thing

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2020-09-17 11:51:45 +02:00
parent 55e1575a53
commit 11a65cab71
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
2 changed files with 2 additions and 9 deletions

View file

@ -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

View file

@ -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') }} && \