Skip to content

Commit c3b0d0b

Browse files
bonzofenixjoergdw
andauthored
(fix) Fix mtar cleanup for acceptance tests (#3691)
* Update .editorconfig to set shell scripts indentation to 2 spaces and enable softtabstop * Makes cf undeploy continue even if it can not finish sucessfully * Update .editorconfig Co-authored-by: joergdw <[email protected]> --------- Co-authored-by: joergdw <[email protected]>
1 parent 7bbca42 commit c3b0d0b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ indent_size = 4
2424
indent_style = tab
2525

2626
[{*.bash,*.sh}]
27-
indent_size = 2
2827
indent_style = tab
28+
indent_size = 2
29+
softtabstop = 2
30+
31+

ci/autoscaler/scripts/common.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,19 @@ function cleanup_credhub(){
8181
}
8282

8383
function cleanup_apps(){
84-
step "cleaning up apps"
84+
step "cleaning up apps"
8585
local mtar_app
8686
local space_guid
8787

8888
cf_target "${autoscaler_org}" "${autoscaler_space}"
8989

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

9393
if [ -n "${mtar_app}" ]; then
94-
cf undeploy "${mtar_app}" -f
94+
set +e
95+
cf undeploy "${mtar_app}" -f --delete-service-brokers --delete-service-keys --delete-services --do-not-fail-on-missing-permissions
96+
set -e
9597
else
9698
echo "No app to undeploy"
9799
fi

0 commit comments

Comments
 (0)