Skip to content

Commit

Permalink
updating envs
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmcshane committed Mar 11, 2024
1 parent 4a9b84f commit 1b00872
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
20 changes: 3 additions & 17 deletions provisioning/testdata/delete-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,12 @@ then
fi
echo "Cluster ID: $CLUSTER_ID"

if [ -z "$CURRENT_INSTANCE_TYPE" ];
then
echo "Current instance type is not set"
exit 1
fi
echo "Current instance type: $CURRENT_INSTANCE_TYPE"

if [ -z "$NEXT_INSTANCE_TYPE" ];
then
echo "Next instance type is not set"
exit 1
fi
echo "Next instance type: $NEXT_INSTANCE_TYPE"

echo "Deleting cluster"
ccp-cli manage contract delete --project-id $PROJECT_ID --cluster-id $CLUSTER_ID

NEXT_TYPE=$CURRENT_INSTANCE_TYPE
CURRENT_TYPE=$NEXT_INSTANCE_TYPE
CLUSTER_ID=0
export NEXT_INSTANCE_TYPE="t3.large"
export CURRENT_INSTANCE_TYPE="t3.medium"
export CLUSTER_ID="0"

echo "Updating values in Porter"

Expand Down
4 changes: 4 additions & 0 deletions provisioning/testdata/update-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ NEXT_TYPE=$CURRENT_INSTANCE_TYPE
CURRENT_TYPE=$NEXT_INSTANCE_TYPE
CLUSTER_ID=$clusterid

export NEXT_INSTANCE_TYPE=$NEXT_TYPE
export CURRENT_INSTANCE_TYPE=$CURRENT_TYPE
export CLUSTER_ID=$CLUSTER_ID

echo "Updating values in Porter"

envsubst < template-porter.yaml > porter.yaml
Expand Down

0 comments on commit 1b00872

Please sign in to comment.