<commit_before>#!/bin/bash
set -e

root=$PWD

export GOOGLE_CREDENTIALS=${GCP_SERVICE_ACCOUNT_KEY}
export GOOGLE_PROJECT=${GCP_PROJECT_ID}
export GOOGLE_REGION=${GCP_REGION}

echo "Deleting PCF installation..."
om-linux \
  --target https://$OPSMAN_URI \
  --skip-ssl-validation \
  --username $OPSMAN_USERNAME \
  --password $<PASSWORD> \
  delete-installation

echo "Deleting provisioned infrastructure..."
terraform destroy -force \
  -state $root/terraform-state/*.tfstate \<commit_msg>add check for ops manager to prevent false failure on unprovisioned pcf<commit_after>#!/bin/bash
set -e

root=$PWD

export GOOGLE_CREDENTIALS=${GCP_SERVICE_ACCOUNT_KEY}
export GOOGLE_PROJECT=${GCP_PROJECT_ID}
export GOOGLE_REGION=${GCP_REGION}

echo "Checking for existence of ops manager..."
if [[ $(dig +nocmd ${OPSMAN_URI} +noall +answer | wc -l) -ne 0 ]]; then 
  echo "Deleting PCF installation..."
  om-linux \
    --target https://$OPSMAN_URI \
    --skip-ssl-validation \
    --username $OPSMAN_USERNAME \
    --password $<PASSWORD> \
    delete-installation
else
  echo "No ops manager could be found."
fi

echo "Deleting provisioned infrastructure..."
terraform destroy -force \
  -state $root/terraform-state/*.tfstate \
{'fraction_non_alphanumeric': 0.13022113022113022, 'fraction_numerical': 0.000819000819000819, 'mean_word_length': 3.987755102040816, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3297779', 'n_tokens_mistral': 432, 'n_tokens_neox': 421, 'n_words': 102}