From bf4e75da40ad45ffb78be9b25d210049dcca2de5 Mon Sep 17 00:00:00 2001 From: Athanasios Voutsadakis Date: Wed, 24 Apr 2019 15:55:45 +0100 Subject: [PATCH] Explicitly target the right space before deploying --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 56b601408..79ab98583 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,7 @@ generate-manifest: cf-deploy: scripts/statsd_exporter ## Deploys the app to Cloud Foundry $(if ${CF_SPACE},,$(error Must specify CF_SPACE)) $(if ${CF_APP},,$(error Must specify CF_APP)) + cf target -o ${CF_ORG} -s ${CF_SPACE} @cf app --guid ${CF_APP} || exit 1 cf rename ${CF_APP} ${CF_APP}-rollback cf push ${CF_APP} -f <(make -s generate-manifest) @@ -245,6 +246,7 @@ cf-deploy: scripts/statsd_exporter ## Deploys the app to Cloud Foundry .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 unbind-service notify-api-db-migration notify-db cf unbind-service notify-api-db-migration notify-config cf unbind-service notify-api-db-migration notify-aws