Skip to content

Commit

Permalink
init_gcloud for shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardoaraujor committed Oct 27, 2022
1 parent 983ab3b commit cec32b7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions polkadot-stps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

ZOMBIENET_V=v1.3.5
CLUSTER_ID="gke_parity-zombienet_europe-west3-b_parity-zombienet"

print_help() {
echo "Polkadot sTPS"
Expand Down Expand Up @@ -43,14 +44,15 @@ install_gcloud() {
fi
}

# init_gcloud() {
init_gcloud() {
# if ! xxx; then
# gcloud auth login
# fi
# if ! yyy; then
# gcloud container clusters get-credentials parity-zombienet --zone europe-west3-b --project parity-zombienet
# fi
# }
if [[ $(kubectl config current-context) != $CLUSTER_ID ]]; then
echo "setting up kubectl context for gcloud cluster..."
gcloud container clusters get-credentials parity-zombienet --zone europe-west3-b --project parity-zombienet
fi
}

build_collator() {
if [ ! -s target/release/parachain-collator ]; then
Expand All @@ -69,7 +71,7 @@ stps_init() {
install_polkadotjs
install_kubectl
install_gcloud
# todo: init_gcloud
init_gcloud
fetch_zombienet
}

Expand Down

0 comments on commit cec32b7

Please sign in to comment.