aboutsummaryrefslogtreecommitdiffstats
path: root/docker/features/hooks/post_checkout
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-08-03 09:56:20 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-08-03 10:01:27 +0200
commitfd85ffb2053267297f7a777a936946aaee7b77c6 (patch)
treec94bfd349a532ce798220531a1dafa4bebebec20 /docker/features/hooks/post_checkout
parent0160f156d74cd811f139cc01d1dd69f1c972ec5d (diff)
Switch to Docker post_checkout hooks
Automated builds work when Dockerfile is modified after checkout. Otherwise they are not triggered [1]. [1] https://github.com/docker/hub-feedback/issues/518 Change-Id: I6ba9e06f9e62011d2f1c1788f2647b1175842ef3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'docker/features/hooks/post_checkout')
-rw-r--r--docker/features/hooks/post_checkout6
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/features/hooks/post_checkout b/docker/features/hooks/post_checkout
new file mode 100644
index 00000000..20a6d4b9
--- /dev/null
+++ b/docker/features/hooks/post_checkout
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+from="${DOCKER_REPO%/*}/functest-core"
+sed -i "s|^FROM.*$|FROM ${from}|" Dockerfile
+
+exit $?