From b019419a5d18410a5400e9f2954f22aa4c2294ff Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Mon, 7 Dec 2020 11:54:12 +0000 Subject: [PATCH] use cf-cli@v7 in makefile a bug in cf-cli v6 caused us to get rate limited, one solution to this is to bump the version of cf-cli we're using to version 7. This has a few syntax changes as the old v3 commands become mainline. To upgrade locally, grab the latest version from brew. ```sh brew install cloudfoundry/tap/cf-cli@7 ``` --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 83443632f..ef4420738 100644 --- a/Makefile +++ b/Makefile @@ -154,18 +154,17 @@ cf-deploy: ## Deploys the app to Cloud Foundry @cf app --guid ${CF_APP} || exit 1 # cancel any existing deploys to ensure we can apply manifest (if a deploy is in progress you'll see ScaleDisabledDuringDeployment) - cf v3-cancel-zdt-push ${CF_APP} || true - - cf v3-apply-manifest ${CF_APP} -f <(make -s generate-manifest) - CF_STARTUP_TIMEOUT=15 cf v3-zdt-push ${CF_APP} --wait-for-deploy-complete # fails after 15 mins if deploy doesn't work + cf cancel-deployment ${CF_APP} || true + # fails after 15 mins if deploy doesn't work + CF_STARTUP_TIMEOUT=15 cf push ${CF_APP} --strategy=rolling -f <(make -s generate-manifest) .PHONY: cf-deploy-api-db-migration cf-deploy-api-db-migration: $(if ${CF_SPACE},,$(error Must specify CF_SPACE)) cf target -o ${CF_ORG} -s ${CF_SPACE} cf push notify-api-db-migration --no-route -f <(make -s CF_APP=notify-api-db-migration generate-manifest) - cf run-task notify-api-db-migration "flask db upgrade" --name api_db_migration + cf run-task notify-api-db-migration --command="flask db upgrade" --name api_db_migration .PHONY: cf-check-api-db-migration-task cf-check-api-db-migration-task: ## Get the status for the last notify-api-db-migration task @@ -174,7 +173,7 @@ cf-check-api-db-migration-task: ## Get the status for the last notify-api-db-mig .PHONY: cf-rollback cf-rollback: ## Rollbacks the app to the previous release $(if ${CF_APP},,$(error Must specify CF_APP)) - cf v3-cancel-zdt-push ${CF_APP} + cf cancel-deployment ${CF_APP} .PHONY: check-if-migrations-to-run check-if-migrations-to-run: