plugeth-statediff/scripts/integration-setup.sh
Roy Crihfield 1abc94b1bd
Some checks failed
Test / Run unit tests (pull_request) Successful in 12m1s
Test / Run integration tests (pull_request) Failing after 3m22s
Test / Run compliance tests (pull_request) Successful in 4m7s
try new external stack
2024-06-26 20:05:08 +08:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Builds and deploys a stack with only what we need.
# This script assumes we are running in the project root.
set -e
STACK_URL="git.vdb.to/cerc-io/fixturenet-eth-stacks"
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}"
laconic-so --verbose fetch-stack "$STACK_URL"
stack_dir=$CERC_REPO_BASE_DIR/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-plugeth
git -C $stack_dir checkout origin/plugeth-stack
# Note: stack path should be absolute, otherwise SO looks for it in packaged stacks
laconic_so="laconic-so --stack $stack_dir --verbose"
echo CERC_STATEDIFF_DB_GOOSE_MIN_VER=21 >> $CONFIG_DIR/stack.env
# don't run plugeth in the debugger
echo CERC_REMOTE_DEBUG=false >> $CONFIG_DIR/stack.env
set -x
if [[ -z $SKIP_BUILD ]]; then
$laconic_so setup-repositories \
--exclude git.vdb.to/cerc-io/plugeth-statediff
# Assume the tested image has been built separately
$laconic_so build-containers \
--exclude cerc/plugeth-statediff
fi
if ! $laconic_so deploy \
--env-file $CONFIG_DIR/stack.env \
--cluster test up
then
$laconic_so deploy --cluster test logs
exit 1
fi