aboutsummaryrefslogtreecommitdiff
path: root/tcwg-base/tcwg-host/build.sh
blob: 6205035d08b1a91bb3f83f106ccdfc6bc58e33d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

trap cleanup_exit INT TERM EXIT

cleanup_exit()
{
    rm -rf docker-stats docker-wrapper run.sh start.sh
}

export LANG=C
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}
top=$(git rev-parse --show-toplevel)

cp $top/tcwg-base/tcwg-host/docker-stats \
   $top/tcwg-base/tcwg-host/docker-wrapper \
   $top/tcwg-base/tcwg-host/run.sh \
   $top/tcwg-base/tcwg-host/start.sh ./

(cd ..; ./build.sh)
"$top"/tcwg-base/validate-dockerfile.sh Dockerfile
docker pull $image 2>/dev/null || true
docker build --tag=$image .
echo $image > .docker-tag