xenial|bionic-amd64-mbedtls-build: create mbedtls ubuntu dockerfiles
The docker files, and their resulting docker image, are consumed by the
MbedTLS Open CI [1]; the corresponding files were taken
as-it-is from [2], so future changes on these definitions should be
done in this repository instead of [3]
[1] https://linaro.atlassian.net/browse/TFC-4
[2]
https://github.com/ARMmbed/mbedtls-test/blob/master/resources/docker_files/
[3] https://github.com/ARMmbed/mbedtls-test
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I977bda679cc36f97b0467c938f479ed8ae31810c
diff --git a/xenial-amd64-mbedtls-build/build.sh b/xenial-amd64-mbedtls-build/build.sh
new file mode 100755
index 0000000..969c66c
--- /dev/null
+++ b/xenial-amd64-mbedtls-build/build.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+ rm -f *.list *.key
+}
+
+export LANG=C
+
+DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
+ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
+PROJECT=$(basename ${PWD} | cut -f3 -d '-')-$(basename ${PWD} | cut -f4 -d '-')
+
+image=trustedfirmware/ci-${ARCHITECTURE}-${PROJECT}-ubuntu:${DISTRIBUTION}
+docker build --pull --tag=$image .
+echo $image > .docker-tag