Skip to content

Commit

Permalink
check docker build and run flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristure committed Mar 1, 2024
1 parent 43164fd commit d944588
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/build_local_tesnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,22 @@ jobs:
with:
repository: multiversx/mx-chain-deploy-go
path: mx-chain-deploy-go
run: |
mv ${GITHUB_WORKSPACE}/mx-chain-deploy-go ..
cd ..
ls -la

# - name: Generate config
# id: generate-config
# run: |
# cd ${GITHUB_WORKSPACE}/scripts/docker-testnet
# export TESTNETDIR=${GITHUB_WORKSPACE}/docker-testnet
# ./prepare.sh
- name: Build node and seednode images
run: |
docker build -f docker/node/Dockerfile . -t node:dev
docker build -f docker/seednode/Dockerfile . -t node:dev
- name: Start localnet
id: generate-config
run: |
cd ${GITHUB_WORKSPACE}/scripts/docker-testnet
export TESTNETDIR=${GITHUB_WORKSPACE}/docker-testnet
export CI_RUN=1
./start.sh
echo "Check everything is alright. Remove once confirmed"
docker ps
curl http://localhost:7950
#
# - name: Deploy local testnet
# run: |
Expand Down
6 changes: 3 additions & 3 deletions scripts/docker-testnet/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export MULTIVERSXTESTNETSCRIPTSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/d

source "$MULTIVERSXTESTNETSCRIPTSDIR/variables.sh"

echo "Stopping all containers"
echo "Stopping all containers..."
docker stop $(docker ps -a -q)

echo "Removing all containers"
docker container prune
echo "Removing all containers..."
docker container prune -f

echo "Removing $TESTNETDIR..."
rm -rf $TESTNETDIR
11 changes: 9 additions & 2 deletions scripts/docker-testnet/variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ export USE_TXGEN=0
# anyway.
export TESTNETDIR="$HOME/MultiversX/testnet"


# Path to mx-chain-deploy-go, branch: master. Default: near mx-chain-go.
export CONFIGGENERATORDIR="$(dirname $MULTIVERSXDIR)/mx-chain-deploy-go/cmd/filegen"

if [[ -n $CI_RUN ]]; then
export CONFIGGENERATORDIR="$(dirname $MULTIVERSXDIR)/mx-chain-go/mx-chain-deploy-go/cmd/filegen"
else
export CONFIGGENERATORDIR="$(dirname $MULTIVERSXDIR)/mx-chain-deploy-go/cmd/filegen"
fi

export CONFIGGENERATOR="$CONFIGGENERATORDIR/filegen" # Leave unchanged.
export CONFIGGENERATOROUTPUTDIR="output"

Expand Down Expand Up @@ -54,7 +61,7 @@ export OBSERVERS_ANTIFLOOD_DISABLE=0
# Shard structure
export SHARDCOUNT=2
export SHARD_VALIDATORCOUNT=3
export SHARD_OBSERVERCOUNT=0
export SHARD_OBSERVERCOUNT=1
export SHARD_CONSENSUS_SIZE=3

# Metashard structure
Expand Down

0 comments on commit d944588

Please sign in to comment.