Skip to content

reset db automatically and also snapshots stuff #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ reset_dbs: &reset_dbs
name: RESET DBs
command: |
if [[ ${CIRCLE_BRANCH} == *"reset-db"* ]]; then
for host in $ln1 $ln2 $ln3; do ssh root@$host 'for f in *.db; do mv -- "$f" "_$f"; done'; done
for host in $ln1 $ln2 $ln3; do
echo "Trying to reset db on $host"
ssh root@$host 'cd /root/zoobc/resource && for f in *.db; do mv -- "$f" "_$f"; done && rm -rf snapshots* *_kv';
done;
else
echo "All good without reset db";
fi
reset_db: &reset_db
name: RESET DB
command: |
if [[ ${CIRCLE_BRANCH} == *"reset-db"* ]]; then
ssh root@$ln4 'for f in *.db; do mv -- "$f" "_$f"; done';
echo "Trying to reset db on ${ln4}"
ssh root@$ln4 'cd /root/zoobc/resource && for f in *.db; do mv -- "$f" "_$f"; done && rm -rf snapsnots* *_kv';
else
echo "All good without reset db"
fi

jobs:
prepare:
<<: *defaults
Expand Down