aboutsummaryrefslogtreecommitdiff
path: root/latest-amd64-tcwg-llvmmonitor/build.sh
blob: 18775bf69d83931e0bc5e7b1755c3af60ff09fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e

trap cleanup_exit INT TERM EXIT

cleanup_exit()
{
    :
}

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}-nginx:${distro}
baseimage=$(grep "^FROM" Dockerfile | head -n 1 | cut -d" " -f 2)

docker pull $baseimage 2>/dev/null || true
docker pull $image 2>/dev/null || true
docker build --tag=$image .
echo $image > .docker-tag