aboutsummaryrefslogtreecommitdiff
path: root/tcwg-base/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tcwg-base/build.sh')
-rwxr-xr-xtcwg-base/build.sh22
1 files changed, 18 insertions, 4 deletions
diff --git a/tcwg-base/build.sh b/tcwg-base/build.sh
index 8ed9a7ef..14751841 100755
--- a/tcwg-base/build.sh
+++ b/tcwg-base/build.sh
@@ -2,9 +2,23 @@
set -e
-#
+trap cleanup_exit INT TERM EXIT
+
+cleanup_exit()
+{
+ rm -rf tcwg-buildslave
+}
+
+export LANG=C
top=$(git rev-parse --show-toplevel)
+distro=$(basename ${PWD} | cut -f1 -d '-')
+arch=$(basename ${PWD} | cut -f2 -d '-')
+name=$(basename ${PWD} | cut -f3- -d '-')
+image=linaro/ci-${arch}-${name}-ubuntu:${distro}
+baseimage=$(grep "^FROM" Dockerfile | head -n 1 | cut -d" " -f 2)
-for i in $top/*-tcwg-base/; do
- (cd $i; ./build.sh)
-done
+"$top"/tcwg-base/validate-dockerfile.sh Dockerfile
+docker pull $baseimage 2>/dev/null || true
+docker pull $image 2>/dev/null || true
+docker build --tag=$image .
+echo $image > .docker-tag