Skip to content

(fix) Fix mtar cleanup for acceptance tests #3691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ indent_size = 4
indent_style = tab

[{*.bash,*.sh}]
indent_size = 2
indent_style = tab
indent_size = 2
softtabstop = 2


8 changes: 5 additions & 3 deletions ci/autoscaler/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,19 @@ function cleanup_credhub(){
}

function cleanup_apps(){
step "cleaning up apps"
step "cleaning up apps"
local mtar_app
local space_guid

cf_target "${autoscaler_org}" "${autoscaler_space}"

space_guid="$(cf space --guid "${autoscaler_space}")"
space_guid="$(cf space --guid "${autoscaler_space}")"
mtar_app="$(curl --header "Authorization: $(cf oauth-token)" "deploy-service.${system_domain}/api/v2/spaces/${space_guid}/mtas" | jq ". | .[] | .metadata | .id" -r)"

if [ -n "${mtar_app}" ]; then
cf undeploy "${mtar_app}" -f
set +e
cf undeploy "${mtar_app}" -f --delete-service-brokers --delete-service-keys --delete-services --do-not-fail-on-missing-permissions
set -e
else
echo "No app to undeploy"
fi
Expand Down
Loading