Better way to do the same thing
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
55e1575a53
commit
11a65cab71
2 changed files with 2 additions and 9 deletions
|
@ -10,12 +10,6 @@
|
||||||
|
|
||||||
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,9 +28,8 @@ 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.
|
# Run a command with random content to prevent Docker from caching the git clone step.
|
||||||
COPY random-file
|
RUN echo {{ now() }}
|
||||||
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