debian-stretch-titan: update deps on change

After the initial clone of osmo-ttcn3-hacks and deps, let docker
download deps/Makefile to invalidate the cache if the file changed.

Run "git pull" and "make deps" afterwards, but only if the Makefile is
different. The "if" saves time in the initial build of the image, it
avoids the "git fetch" on every dependency repository during "make deps".

Related: OS#5017
Change-Id: I56673312cfb23375d67900016aaac1931f677275
changes/18/22818/2
Oliver Smith 2 years ago
parent 61fed0ad39
commit 73d23109b1
  1. 8
      debian-stretch-titan/Dockerfile

@ -52,6 +52,12 @@ RUN DPKG_ARCH="$(dpkg --print-architecture)" && export $DPKG_ARCH && \
RUN git config --global user.email docker@dock.er && \
git config --global user.name "Dock Er"
# clone osmo-ttcn3-hacks and deps
# clone osmo-ttcn3-hacks and deps, invalidate cache if deps change (OS#5017)
RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git && \
make -C /osmo-ttcn3-hacks deps
ADD https://git.osmocom.org/osmo-ttcn3-hacks/plain/deps/Makefile /tmp/deps-Makefile
RUN if ! diff -q /tmp/deps-Makefile /osmo-ttcn3-hacks/deps/Makefile; then \
cd /osmo-ttcn3-hacks && \
git pull && \
make deps; \
fi

Loading…
Cancel
Save