aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-02-10 14:52:38 +0100
committerOliver Smith <osmith@sysmocom.de>2021-02-11 15:45:40 +0100
commit73d23109b14aaf2031b60cc06eec3573ae4920bc (patch)
tree8d189193c15fe9ed29f220f8b7c9b7b607745974
parent61fed0ad3959b0b5d841bad9d99217a20cb9ffaa (diff)
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
-rw-r--r--debian-stretch-titan/Dockerfile8
1 files changed, 7 insertions, 1 deletions
diff --git a/debian-stretch-titan/Dockerfile b/debian-stretch-titan/Dockerfile
index 0f4f17e..39ff76f 100644
--- a/debian-stretch-titan/Dockerfile
+++ b/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