Skip to content
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
27 changes: 0 additions & 27 deletions .github/workflows/acceptance_tests_mta.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/acceptance_tests_mta_close.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/acceptance_tests_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
deployment_name:
required: true
type: string
deploy_apps:
required: false
type: boolean
ops_files:
required: false
type: string
Expand Down Expand Up @@ -61,14 +58,8 @@ jobs:
shell: bash
env:
OPS_FILES: ${{ inputs.ops_files }}
ENABLE_MTAR: ${{ inputs.deploy_apps }}
run: make --directory="${AUTOSCALER_DIR}" deploy-autoscaler

- name: Deploy Apps
shell: bash
run: make --directory="${AUTOSCALER_DIR}" deploy-apps
if: ${{ inputs.deploy_apps }}

- name: Register autoscaler
shell: bash
run: make --directory="${AUTOSCALER_DIR}" deploy-register-cf
Expand Down
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -374,23 +374,13 @@ deploy-cleanup:

bosh-release-path := ./target/bosh-releases


.PHONY: mta-release
mta-release: mta-build
@echo " - building mtar release '${VERSION}' to dir: '${DEST}' "

.PHONY: acceptance-release
acceptance-release: clean-acceptance go-mod-tidy go-mod-vendor build-test-app
@echo " - building acceptance test release '${VERSION}' to dir: '${DEST}' "
@mkdir -p ${DEST}
${AUTOSCALER_DIR}/scripts/compile-acceptance-tests.sh
@tar --create --auto-compress --directory="src" --file="${ACCEPTANCE_TESTS_FILE}" 'acceptance'

.PHONY: mta-build
mta-build:
@echo " - building mta"
@make --directory='${autoscaler-dir}' mta-build

.PHONY: build-test-app
build-test-app:
@make --directory='${test-app-dir}' build
Expand Down
1 change: 0 additions & 1 deletion ci/autoscaler/scripts/cleanup-autoscaler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function main() {
bosh_login "${BBL_STATE_PATH}"
cf_login

cleanup_apps
cleanup_acceptance_run
cleanup_service_broker
cleanup_bosh_deployment
Expand Down
29 changes: 0 additions & 29 deletions ci/autoscaler/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,35 +104,6 @@ function cleanup_credhub(){
retry 3 credhub delete --path="/bosh-autoscaler/${deployment_name}"
}

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

cf_target "${autoscaler_org}" "${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
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

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
}


function unset_vars() {
unset PR_NUMBER
unset DEPLOYMENT_NAME
Expand Down
27 changes: 6 additions & 21 deletions ci/autoscaler/scripts/deploy-autoscaler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,27 +159,12 @@ function find_or_upload_release() {
}

function pre_deploy() {
if [[ "${enable_mtar}" == "true" ]]; then
ops_files+=" ${autoscaler_dir}/operations/configure-cf-services.yml"
ops_files+=" ${autoscaler_dir}/operations/use-cf-services.yml"

cf_login

cf_target ${autoscaler_org} ${autoscaler_space}
local autoscaler_cf_server_xfcc_valid_org_guid=$(cf org ${AUTOSCALER_ORG} --guid)
local autoscaler_cf_server_xfcc_valid_space_guid=$(cf space ${AUTOSCALER_SPACE} --guid)

add_variable "autoscaler_cf_server_xfcc_valid_org_guid" "${autoscaler_cf_server_xfcc_valid_org_guid}"
add_variable "autoscaler_cf_server_xfcc_valid_space_guid" "${autoscaler_cf_server_xfcc_valid_space_guid}"
else
case "${cpu_upper_threshold}" in
"100") ;;
"200") ops_files+=" ${autoscaler_dir}/operations/cpu_upper_threshold_200.yml" ;;
"400") ops_files+=" ${autoscaler_dir}/operations/cpu_upper_threshold_400.yml" ;;
*) echo "No Ops file for cpu_upper_threshold of ${cpu_upper_threshold}"; exit 1 ;;
esac
fi

case "${cpu_upper_threshold}" in
"100") ;;
"200") ops_files+=" ${autoscaler_dir}/operations/cpu_upper_threshold_200.yml" ;;
"400") ops_files+=" ${autoscaler_dir}/operations/cpu_upper_threshold_400.yml" ;;
*) echo "No Ops file for cpu_upper_threshold of ${cpu_upper_threshold}"; exit 1 ;;
esac
}

log "Deploying autoscaler '${bosh_release_version}' with name '${deployment_name}'"
Expand Down
23 changes: 0 additions & 23 deletions ci/autoscaler/scripts/undeploy-apps.sh

This file was deleted.

12 changes: 2 additions & 10 deletions ci/autoscaler/scripts/vars.source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,9 @@ export PR_NUMBER=${PR_NUMBER:-$(gh pr view --json number --jq '.number' )}
debug "PR_NUMBER: '${PR_NUMBER}'"
user=${USER:-"test"}

export ENABLE_MTAR=${ENABLE_MTAR:-false}
debug "ENABLE_MTAR: ${ENABLE_MTAR}"
enable_mtar=${ENABLE_MTAR}

if [ "${ENABLE_MTAR}" = "true" ]; then
export DEPLOYMENT_NAME="${DEPLOYMENT_NAME:-"autoscaler-mta-${PR_NUMBER}"}"
[ "${DEPLOYMENT_NAME}" = "autoscaler-mta" ] && DEPLOYMENT_NAME="${user}"
else
export DEPLOYMENT_NAME="${DEPLOYMENT_NAME:-"autoscaler-${PR_NUMBER}"}"
[ "${DEPLOYMENT_NAME}" = "autoscaler-" ] && DEPLOYMENT_NAME="${user}"
fi
export DEPLOYMENT_NAME="${DEPLOYMENT_NAME:-"autoscaler-${PR_NUMBER}"}"
[ "${DEPLOYMENT_NAME}" = "autoscaler-" ] && DEPLOYMENT_NAME="${user}"

debug "DEPLOYMENT_NAME: ${DEPLOYMENT_NAME}"
log "set up vars: DEPLOYMENT_NAME=${DEPLOYMENT_NAME}"
Expand Down
Loading