9696 env_name=${{ steps.setup-bbl-env.outputs.envName }}
9797 gsutil cp -R ./$env_name gs://cf-cli-bosh-lites/
9898
99- - name : Setup tmate session
100- if : failure()
101- uses : mxschmitt/action-tmate@v3
102-
10399 - name : Checkout cf-deployment
104100 uses : actions/checkout@v4
105101 with :
@@ -112,7 +108,7 @@ jobs:
112108 with :
113109 repository : cloudfoundry/bosh-deployment
114110 path : bosh-deployment
115-
111+
116112 - name : Upload latest CAPI release
117113 if : ${{ (vars.USE_LATEST_CAPI == true) || (vars.CAPI_RELEASE_VERSION != '') }}
118114 env :
@@ -154,9 +150,35 @@ jobs:
154150 -o ${GITHUB_WORKSPACE}/cf-deployment/operations/use-internal-lookup-for-route-services.yml \
155151 -o ${GITHUB_WORKSPACE}/cli/.github/ops-files/diego-cell-instances.yml \
156152 -o ${GITHUB_WORKSPACE}/cli/.github/ops-files/add-uaa-client-credentials.yml \
153+ -o ${GITHUB_WORKSPACE}/cli/.github/ops-files/increase-route-registration-interval.yml \
157154 -o ${GITHUB_WORKSPACE}/cli/.github/ops-files/add-oidc-provider.yml ${additional_args} \
158155 -v client-secret="${{ secrets.CLIENT_SECRET }}" \
159156 -v system_domain=${SYSTEM_DOMAIN} \
160157 > ./director.yml
161158
162159 bosh deploy director.yml
160+
161+ - name : delete bosh
162+ if : failure()
163+ run : |
164+ env_name="${{ steps.setup-bbl-env.outputs.envName }}"
165+ if [ -d ${env_name}/bbl_state ]; then
166+ cd ${env_name}/bbl-state
167+ eval "$(bbl print-env)"
168+
169+ echo "Deleting env ${env_name}"
170+ # echo ${BBL_GCP_SERVICE_ACCOUNT_KEY} > key.json
171+ # chmod +x delete-director-override.sh
172+ # chmod +x delete-jumpbox-override.sh
173+ # chmod +x terraform/.terraform/providers/registry.terraform.io/hashicorp/google/6.41.0/linux_amd64/terraform-provider-google_v6.41.0_x5
174+ bbl down --no-confirm --gcp-service-account-key=key.json
175+
176+ echo "Deleting bbl state directory"
177+ if gsutil ls gs://cf-cli-bosh-lites | grep -q /${env_name}/; then
178+ gsutil rm -R gs://cf-cli-bosh-lites/${env_name}
179+ fi
180+ fi
181+
182+ - name : Setup tmate session
183+ if : failure()
184+ uses : mxschmitt/action-tmate@v3
0 commit comments