Skip to content

Commit

Permalink
Merge pull request #7 from malscent/MB-41762-UpdateSyncGateway281
Browse files Browse the repository at this point in the history
Need to remove deployments before next deploy
  • Loading branch information
malscent authored Feb 23, 2021
2 parents e13d645 + ef565a7 commit adf6cf3
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ echo "Save Resource Group: ${SAVE}"

if [ "$SAVE" -eq "1" ]; then
echo "Save was passed, deleting resources but leaving group."
az deployment group create --verbose --template-file "${SCRIPT_SOURCE}/ResourceGroupCleanup.template.json" --resource-group $RESOURCE_GROUP --mode Complete
az deployment group create --verbose --template-file "${SCRIPT_SOURCE}/ResourceGroupCleanup.template.json" --resource-group "$RESOURCE_GROUP" --mode Complete
echo "Deleting Deployments"
for row in $(az deployment group list -g "$RESOURCE_GROUP" | jq -r -c '.[] | .name');
do
az deployment group delete -g "$RESOURCE_GROUP" -n "$row"
done
exit 0
fi

az group delete --name $RESOURCE_GROUP --yes
az group delete --name "$RESOURCE_GROUP" --yes

0 comments on commit adf6cf3

Please sign in to comment.