Add automation for ADML HTTP image creation
[anna.git] / tools / build-adml-http
diff --git a/tools/build-adml-http b/tools/build-adml-http
new file mode 100755 (executable)
index 0000000..5f635c2
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+
+REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null)"
+[ -z "$REPO_DIR" ] && { echo "You must execute under a valid git repository !" ; exit 1 ; }
+
+IMAGEDIR=${REPO_DIR}/docker-images/anna-adml-http
+AD=${IMAGEDIR}/opt/adml
+
+#############
+# EXECUTION #
+#############
+
+TAG=$(${REPO_DIR}/tools/version)
+
+# Docker build functions
+source ${REPO_DIR}/tools/docker.src
+
+# Deploy Anna-ADML-HTTP:
+rm -rf ${AD}
+echo ${AD} | ${REPO_DIR}/example/diameter/launcher/deploy-adml-http.sh
+
+echo
+echo "Generate docker image ..."
+build_image ${IMAGEDIR} ${TAG} ${IMAGEDIR}
+
+echo
+echo "Done !"
+echo
+