Skip to content

Commit

Permalink
Use different orgs for different mtar deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzofenix committed Sep 2, 2024
1 parent 084d12d commit 8424a71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ci/autoscaler/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ function cleanup_apps(){
if ! cf spaces | grep --quiet --regexp="^${AUTOSCALER_SPACE}$"; then
cf delete-space -f "${AUTOSCALER_SPACE}"
fi

if ! cf orgs | grep --quiet --regexp="^${AUTOSCALER_ORG}$"; then
cf delete-org -f "${AUTOSCALER_ORG}"
fi
}


Expand Down
3 changes: 1 addition & 2 deletions ci/autoscaler/scripts/vars.source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ debug "DEPLOYMENT_NAME: ${DEPLOYMENT_NAME}"
log "set up vars: DEPLOYMENT_NAME=${DEPLOYMENT_NAME}"
deployment_name="${DEPLOYMENT_NAME}"

export AUTOSCALER_ORG="${AUTOSCALER_ORG:-"autoscaler-${PR_NUMBER}"}"
[ "${AUTOSCALER_ORG}" = "autoscaler-" ] && AUTOSCALER_ORG="${user}"
export AUTOSCALER_ORG="${AUTOSCALER_ORG:-$DEPLOYMENT_NAME}"
debug "AUTOSCALER_ORG: ${AUTOSCALER_ORG}"
log "set up vars: AUTOSCALER_ORG=${AUTOSCALER_ORG}"
autoscaler_org="${AUTOSCALER_ORG}"
Expand Down

0 comments on commit 8424a71

Please sign in to comment.