mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Add a make target to download statsd_exporter binary
Downloads a linux binary from Github and puts it in the scripts folder. This should add it to the package CI uploads to CF during deploy. Unfortunately, since out .cfignore is a symlink to .gitignore we can't add the file to be ignored by git, so it shows up in untracked if `cf-deploy` is run locally.
This commit is contained in:
9
Makefile
9
Makefile
@@ -199,7 +199,10 @@ clean-docker-containers: ## Clean up any remaining docker containers
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf node_modules cache target venv .coverage build tests/.cache
|
rm -rf node_modules cache target venv .coverage build tests/.cache scripts/statsd_exporter
|
||||||
|
|
||||||
|
scripts/statsd_exporter:
|
||||||
|
curl -sSL https://github.com/prometheus/statsd_exporter/releases/download/v0.9.0/statsd_exporter-0.9.0.linux-amd64.tar.gz | tar zx --strip-components=1 -C scripts/ statsd_exporter-0.9.0.linux-amd64/statsd_exporter
|
||||||
|
|
||||||
.PHONY: cf-login
|
.PHONY: cf-login
|
||||||
cf-login: ## Log in to Cloud Foundry
|
cf-login: ## Log in to Cloud Foundry
|
||||||
@@ -223,7 +226,7 @@ generate-manifest:
|
|||||||
<(${DECRYPT_CMD} ${NOTIFY_CREDENTIALS}/credentials/${CF_SPACE}/paas/environment-variables.gpg) 2>&1
|
<(${DECRYPT_CMD} ${NOTIFY_CREDENTIALS}/credentials/${CF_SPACE}/paas/environment-variables.gpg) 2>&1
|
||||||
|
|
||||||
.PHONY: cf-deploy
|
.PHONY: cf-deploy
|
||||||
cf-deploy: ## Deploys the app to Cloud Foundry
|
cf-deploy: scripts/statsd_exporter ## Deploys the app to Cloud Foundry
|
||||||
$(if ${CF_SPACE},,$(error Must specify CF_SPACE))
|
$(if ${CF_SPACE},,$(error Must specify CF_SPACE))
|
||||||
$(if ${CF_APP},,$(error Must specify CF_APP))
|
$(if ${CF_APP},,$(error Must specify CF_APP))
|
||||||
@cf app --guid ${CF_APP} || exit 1
|
@cf app --guid ${CF_APP} || exit 1
|
||||||
@@ -261,7 +264,7 @@ cf-rollback: ## Rollbacks the app to the previous release
|
|||||||
cf rename ${CF_APP}-rollback ${CF_APP}
|
cf rename ${CF_APP}-rollback ${CF_APP}
|
||||||
|
|
||||||
.PHONY: cf-push
|
.PHONY: cf-push
|
||||||
cf-push:
|
cf-push: scripts/statsd_exporter
|
||||||
$(if ${CF_APP},,$(error Must specify CF_APP))
|
$(if ${CF_APP},,$(error Must specify CF_APP))
|
||||||
cf target -o ${CF_ORG} -s ${CF_SPACE}
|
cf target -o ${CF_ORG} -s ${CF_SPACE}
|
||||||
cf push ${CF_APP} -f <(make -s generate-manifest)
|
cf push ${CF_APP} -f <(make -s generate-manifest)
|
||||||
|
|||||||
Reference in New Issue
Block a user