Add dockerfile for building image
Change-Id: Id29b2dbcc53b9c63b195fef124e98b282b5b4a0d
Related-prod: PRODX-975
diff --git a/pre-build.sh b/pre-build.sh
new file mode 100644
index 0000000..32b6c02
--- /dev/null
+++ b/pre-build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#Clone Horizon for running tests
+
+set -ex
+
+GERRIT_SCHEME=${GERRIT_SCHEME:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\1|p')}
+GERRIT_NAME=${GERRIT_NAME:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\2|p')}
+GERRIT_HOST_PORT=${GERRIT_HOST_PORT:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\3|p')}
+HORIZON_LIB_REPO="${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST_PORT}/packaging/sources/horizon"
+GERRIT_BRANCH=${GERRIT_BRANCH:-mcp/stein}
+
+git clone ${HORIZON_LIB_REPO}
+cd horizon/ ; git checkout ${GERRIT_BRANCH}