Cache the Nim build in docker; Use unique keys for the testnet bootstrap nodes

This commit is contained in:
Zahary Karadjov 2019-11-14 18:48:30 +00:00
parent f4273f7b89
commit 67991065d6
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
2 changed files with 11 additions and 1 deletions

View File

@ -14,6 +14,11 @@ RUN cd /root \
&& make -j$(nproc) update \ && make -j$(nproc) update \
&& make deps && make deps
# Please note that the commands above have the goal of caching the compilation
# of Nim and p2pd, but don't depend on the current git revision. This means
# that the cache can become outdated over time and you'll start seeing Nim
# being compiled on every run. If this happens, just prune your docker cache
# to get a fresh up-to-date version of Nim and p2pd.
ARG GIT_REVISION ARG GIT_REVISION
ARG NETWORK_NIM_FLAGS ARG NETWORK_NIM_FLAGS

View File

@ -8,6 +8,10 @@ export NETWORK=$1
export NETWORK_NIM_FLAGS=$(./load-testnet-nim-flags.sh $NETWORK) export NETWORK_NIM_FLAGS=$(./load-testnet-nim-flags.sh $NETWORK)
export GIT_REVISION=$(git rev-parse HEAD) export GIT_REVISION=$(git rev-parse HEAD)
set -a
source $NETWORK.env
set +a
cd .. cd ..
if [ -f .env ]; then if [ -f .env ]; then
@ -20,10 +24,11 @@ echo Execution plan:
echo "Testnet name : $NETWORK" echo "Testnet name : $NETWORK"
echo "Bootstrap node hostname : ${BOOTSTRAP_HOST:="master-01.do-ams3.nimbus.test.statusim.net"}" echo "Bootstrap node hostname : ${BOOTSTRAP_HOST:="master-01.do-ams3.nimbus.test.statusim.net"}"
echo "Bootstrap node ip : ${BOOTSTRAP_IP:="$(dig +short $BOOTSTRAP_HOST)"}" echo "Bootstrap node ip : ${BOOTSTRAP_IP:="$(dig +short $BOOTSTRAP_HOST)"}"
echo "Bootstrap node port : ${BOOTSTRAP_PORT:=9000}"
echo "Reset testnet at end : ${PUBLISH_TESTNET_RESETS:="1"}" echo "Reset testnet at end : ${PUBLISH_TESTNET_RESETS:="1"}"
echo "Testnet metadata repo : ${ETH2_TESTNETS_GIT_URL:="git@github.com:${ETH2_TESTNETS_ORG:=eth2-clients}/eth2-testnets"}" echo "Testnet metadata repo : ${ETH2_TESTNETS_GIT_URL:="git@github.com:${ETH2_TESTNETS_ORG:=eth2-clients}/eth2-testnets"}"
echo "Testnet metadata dir : ${ETH2_TESTNETS:="build/eth2-testnets"}" echo "Testnet metadata dir : ${ETH2_TESTNETS:="build/eth2-testnets"}"
echo "Beacon node data dir : ${DATA_DIR:="build/testnet-reset-data"}" echo "Beacon node data dir : ${DATA_DIR:="build/testnet-reset-data/$NETWORK"}"
echo "Nim build flags : $NETWORK_NIM_FLAGS" echo "Nim build flags : $NETWORK_NIM_FLAGS"
while true; do while true; do