Skip to content

Instantly share code, notes, and snippets.

@mr-pascal
Created January 24, 2021 08:12
Show Gist options
  • Save mr-pascal/934c7e383339a7ad515165f135c1f09c to your computer and use it in GitHub Desktop.
Save mr-pascal/934c7e383339a7ad515165f135c1f09c to your computer and use it in GitHub Desktop.
####################################
########### VARIABLES ##############
####################################
GCP_PROJECT="YOUR_PROJECT_ID"
SERVICE_NAME="my-react-app"
REGION="europe-west1"
####################################
###### GENERATED VARIABLES #########
####################################
IMAGE_NAME="gcr.io/$GCP_PROJECT/$SERVICE_NAME"
IMAGE_NAME_LATEST="$IMAGE_NAME:latest"
####################################
########## CLEANUP GCR #############
####################################
gcloud container images delete "$IMAGE_NAME_LATEST" \
--force-delete-tags \
--quiet
####################################
####### CLEANUP Cloud RUn ##########
####################################
gcloud run services delete $SERVICE_NAME \
--project $GCP_PROJECT \
--platform managed \
--region $REGION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment