Prevent Docker from caching the git clone content
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
2baa486616
commit
55e1575a53
2 changed files with 9 additions and 0 deletions
|
@ -10,6 +10,12 @@
|
||||||
|
|
||||||
vars:
|
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:
|
roles:
|
||||||
- role: openshift/project
|
- role: openshift/project
|
||||||
app: fasjson
|
app: fasjson
|
||||||
|
|
|
@ -28,6 +28,9 @@ RUN dnf install -y \
|
||||||
python3-wheel && \
|
python3-wheel && \
|
||||||
dnf autoremove -y && \
|
dnf autoremove -y && \
|
||||||
dnf clean all -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 && \
|
RUN git clone https://github.com/fedora-infra/fasjson.git && \
|
||||||
pushd fasjson && \
|
pushd fasjson && \
|
||||||
git checkout {{ (env == 'production')|ternary('stable', 'staging') }} && \
|
git checkout {{ (env == 'production')|ternary('stable', 'staging') }} && \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue