Skip to content

Commit

Permalink
update scripts for clean command
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Jun 4, 2024
1 parent 6d40a2a commit f5ae15c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ jobs:
chmod 600 private_key.pem
sudo apt update
sudo apt install -y --no-install-recommends openssh-server
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST bash -c "'sleep 30' && docker image prune -a -f && docker ps | grep main_debug | awk '{print \$1}' | xargs -r docker stop && docker ps -a | grep main_debug | awk '{print \$1}' | xargs -r docker rm -f && docker pull 'ghcr.io/rooch-network/rooch:main_debug' && docker run --rm -v /root:/root ghcr.io/rooch-network/rooch:main_debug server clean -n dev && docker run -d -v /root:/root -p 50051:50051 'ghcr.io/rooch-network/rooch:main_debug' server start -n dev --btc-rpc-url '${{secrets.BTC_REGTEST_RPC_URL}}' --btc-rpc-username rooch-regtest --btc-rpc-password '${{secrets.BTC_REGTEST_RPC_PWD}}' --da '{\"internal-da-server\": {\"servers\": [{\"open-da\": {\"scheme\": \"fs\"}}]}}'"
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST bash -c "'sleep 30' && docker image prune -a -f && docker ps | grep main_debug | awk '{print \$1}' | xargs -r docker stop && docker ps -a | grep main_debug | awk '{print \$1}' | xargs -r docker rm -f && docker pull 'ghcr.io/rooch-network/rooch:main_debug' && docker run --rm -v /root:/root ghcr.io/rooch-network/rooch:main_debug server clean -n dev -f && docker run -d -v /root:/root -p 50051:50051 'ghcr.io/rooch-network/rooch:main_debug' server start -n dev --btc-rpc-url '${{secrets.BTC_REGTEST_RPC_URL}}' --btc-rpc-username rooch-regtest --btc-rpc-password '${{secrets.BTC_REGTEST_RPC_PWD}}' --da '{\"internal-da-server\": {\"servers\": [{\"open-da\": {\"scheme\": \"fs\"}}]}}'"
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST "cd /root/rooch && git pull origin main && bash scripts/check_dev_deploy_status.sh main_debug '${{ secrets.DEV_MNEMONIC_PHRASE }}'"
2 changes: 1 addition & 1 deletion infra/rooch-portal/script/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ default_address=$(rooch account list | awk '/0x[0-9a-fA-F]+/{addr=$1} END{print
reset () {
lsof -ti:50051 | xargs kill

rooch server clean
rooch server clean -n local -f

nohup cargo run --package rooch --bin rooch server start &

Expand Down
2 changes: 1 addition & 1 deletion scripts/bitcoin/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ clean() {
rm -rf $HOME/regtest/.bitcoin

# clean rooch data
cargo run --package rooch --bin rooch server clean -n local
cargo run --package rooch --bin rooch server clean -n local -f
}

reset() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_dev_deploy_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ STATUS=$(docker inspect --format "{{.State.Status}}" $CONTAINER_ID)
if [ "$STATUS" != "running" ]; then
echo "!!! Container $CONTAINER_ID is not running, trying to clean data and restart"
echo "Start cleaning the data with image_tag: $IMAGE_TAG"
docker run --rm -v "/root:/root" ghcr.io/rooch-network/rooch:$IMAGE_TAG server clean -n dev
docker run --rm -v "/root:/root" ghcr.io/rooch-network/rooch:$IMAGE_TAG server clean -n dev -f
rm -rf ~/.rooch
docker run --rm -v "/root:/root" ghcr.io/rooch-network/rooch:$IMAGE_TAG init -m "$(echo $DEV_MNEMONIC_PHRASE)" --skip-password
docker start $CONTAINER_ID
Expand Down

0 comments on commit f5ae15c

Please sign in to comment.