blob: 082c3411bb8264ae5ccc82c84a922e7d54573399 [file] [log] [blame]
Paul Sokolovskyeb8ca082024-03-06 21:43:56 +07001#!/bin/sh
2
3set -e
4
5trap cleanup_exit INT TERM EXIT
6
7cleanup_exit()
8{
9 rm -f *.list *.key
10}
11
Nicola Mazzucato8ab727f2024-04-19 13:48:05 +010012target=ci
13
14while [ $# -gt 0 ]; do
15 case $1 in
16 -l)
17 echo "local build config chosen"
18 target=local
19 shift
20 ;;
21 *)
22 echo "Invalid argument: only -l allowed"
23 exit 1
24 ;;
25 esac
26done
27
Paul Sokolovskyeb8ca082024-03-06 21:43:56 +070028export LANG=C
29
30DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
31ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')
32PROJECT=$(basename ${PWD} | cut -f3 -d '-')-$(basename ${PWD} | cut -f4 -d '-')
33
34cp -a ../setup-sshd .
35
36# Copy armclang toolchains required for the build (previously fetched
37# from s3://trustedfirmware-private/armclang/ by build harness).
38cp ../ARMCompiler6.21_standalone_linux-x86_64.tar.gz .
39
40image=trustedfirmware/ci-${ARCHITECTURE}-${PROJECT}-ubuntu:${DISTRIBUTION}${DOCKER_SUFFIX}
Nicola Mazzucato8ab727f2024-04-19 13:48:05 +010041docker build --target=base-$target --pull --tag=$image .
Paul Sokolovskyeb8ca082024-03-06 21:43:56 +070042echo $image > .docker-tag