Skip to content
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

dev: rm devnet folders on destroy / change default configs for node-upgrade #124

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BOR_REPO="https://github.com/maticnetwork/bor.git" # repo of bor project
BOR_BRANCH=c5569e4da9ebe0ce4e63aec571966c71234f7cfc # todo change to develop once https://polygon.atlassian.net/browse/POS-979 is solved (bor branch defining the version to be used in the devnet)
HEIMDALL_REPO="https://github.com/maticnetwork/heimdall.git" # repo of heimdall project
HEIMDALL_BRANCH=develop # heimdall branch defining the version to be used in the devnet
CONTRACTS_BRANCH=mardizzone/node-upgrade # contracts branch defining the version to be used in the devnet (repo https://github.com/maticnetwork/contracts). To use node v16.x, please stick with mardizzone/node-upgrade branch. todo change to master once contracts team merges the PR
CONTRACTS_BRANCH=c5569e4da9ebe0ce4e63aec571966c71234f7cfc # contracts branch defining the version to be used in the devnet (repo https://github.com/maticnetwork/contracts). To use node v16.x, please stick with c5569e4da9ebe0ce4e63aec571966c71234f7cfc branch. todo change to master once contracts team merges the PR
GENESIS_CONTRACTS_BRANCH=mardizzone/node-upgrade # Genesis contracts branch defining the version to be used in the devnet (repo https://github.com/maticnetwork/genesis-contracts). To use node v16.x, please stick with mardizzone/node-upgrade branch. todo change to master once contracts team merges the PR
MATIC_CLI_REPO="https://github.com/maticnetwork/matic-cli.git" # repo of matic-cli to run a specific version remotely using express-cli
MATIC_CLI_BRANCH=master # matic-cli branch used on the remote machines to start the environment
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Please, make sure to install the following software/packages on the VMs.

* Ganache CLI (only _host_)
```bash
sudo npm install -g ganache-cli
sudo npm install -g ganache
```

### Usage
Expand Down
2 changes: 1 addition & 1 deletion configs/devnet/docker-setup-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ borChainId: 15005
heimdallChainId: heimdall-4052
borBranch: c5569e4da9ebe0ce4e63aec571966c71234f7cfc # todo change to develop once https://polygon.atlassian.net/browse/POS-979 is solved
heimdallBranch: develop
contractsBranch: mardizzone/node-upgrade # todo change to master once contracts team merges the PR
contractsBranch: c5569e4da9ebe0ce4e63aec571966c71234f7cfc # todo change to master once contracts team merges the PR
genesisContractsBranch: mardizzone/node-upgrade # todo change to master once contracts team merges the PR
sprintSize: 64
blockNumber: '0'
Expand Down
2 changes: 1 addition & 1 deletion configs/devnet/remote-setup-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ borChainId: 15005
heimdallChainId: heimdall-4052
borBranch: c5569e4da9ebe0ce4e63aec571966c71234f7cfc
heimdallBranch: develop
contractsBranch: mardizzone/node-upgrade
contractsBranch: c5569e4da9ebe0ce4e63aec571966c71234f7cfc
genesisContractsBranch: mardizzone/node-upgrade
sprintSize: 64
blockNumber: '0'
Expand Down
7 changes: 7 additions & 0 deletions src/express/commands/destroy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { getDevnetId } from "../common/config-utils";

const shell = require("shelljs");

export async function terraformDestroy() {
Expand All @@ -8,4 +10,9 @@ export async function terraformDestroy() {
...process.env,
}
});

let devnetId = getDevnetId()
console.log(`📍Deleting ./deployments/devnet-${devnetId} folder...`)
shell.exec(`cd ../../ && rm -rf ./deployments/devnet-${devnetId}`)
console.log(`📍devnet-${devnetId} successfully destroyed!`)
}