forked from ten-protocol/go-ten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testnet-local-build_images.sh
executable file
·56 lines (44 loc) · 2.04 KB
/
testnet-local-build_images.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
#
# This script builds all images locally
#
# Ensure any fail is loud and explicit
set -euo pipefail
# Define local usage vars
start_path="$(cd "$(dirname "${0}")" && pwd)"
testnet_path="${start_path}"
root_path="${testnet_path}/.."
tools_path="${root_path}/tools"
parallel=true
# Fetch options
for argument in "$@"
do
key=$(echo $argument | cut -f1 -d=)
value=$(echo $argument | cut -f2 -d=)
case "$key" in
--parallel) parallel=${value} ;;
*)
esac
done
if ${parallel} ;
then
echo "Running parallel builds with docker compose"
ROOT_PATH=$root_path docker compose -f $testnet_path/docker-compose.local.yml build --parallel
exit 0
fi
# run the builds in parallel - echo the full command to output
echo "Running parallel builds with regular docker"
command() {
echo $@
$( "$@" )
echo $@ completed
}
command docker build -t testnetobscuronet.azurecr.io/obscuronet/eth2network:latest -f "${testnet_path}/eth2network.Dockerfile" "${root_path}" &
command docker build -t testnetobscuronet.azurecr.io/obscuronet/host:latest -f "${root_path}/dockerfiles/host.Dockerfile" "${root_path}" &
command docker build -t testnetobscuronet.azurecr.io/obscuronet/hardhatdeployer:latest -f "${tools_path}/hardhatdeployer/Dockerfile" "${root_path}" &
command docker build -t testnetobscuronet.azurecr.io/obscuronet/enclave:latest --build-arg TESTMODE=true -f "${root_path}/dockerfiles/enclave.Dockerfile" "${root_path}" &
#command docker build -t testnetobscuronet.azurecr.io/obscuronet/enclave_debug:latest -f "${root_path}/dockerfiles/enclave.debug.Dockerfile" "${root_path}" &
command docker build -t testnetobscuronet.azurecr.io/obscuronet/tenscan:latest -f "${tools_path}/tenscan/Dockerfile" "${root_path}" &
command docker build -t testnetobscuronet.azurecr.io/obscuronet/faucet:latest -f "${tools_path}/faucet/Dockerfile" "${root_path}" &
command docker build -t testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway:latest -f "${tools_path}/walletextension/Dockerfile" "${root_path}" &
wait