mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 04:08:25 -04:00
Merge pull request #2597 from alphagov/deploy-static-files-to-s3
Copy static files to S3 when deploying
This commit is contained in:
6
Makefile
6
Makefile
@@ -97,6 +97,10 @@ upload-paas-artifact:
|
|||||||
$(if ${JENKINS_S3_BUCKET},,$(error Must specify JENKINS_S3_BUCKET))
|
$(if ${JENKINS_S3_BUCKET},,$(error Must specify JENKINS_S3_BUCKET))
|
||||||
aws s3 cp --region eu-west-1 --sse AES256 target/notifications-admin.zip s3://${JENKINS_S3_BUCKET}/build/notifications-admin/${DEPLOY_BUILD_NUMBER}.zip
|
aws s3 cp --region eu-west-1 --sse AES256 target/notifications-admin.zip s3://${JENKINS_S3_BUCKET}/build/notifications-admin/${DEPLOY_BUILD_NUMBER}.zip
|
||||||
|
|
||||||
|
.PHONY: upload-static ## Upload the static files to be served from S3
|
||||||
|
upload-static:
|
||||||
|
aws s3 cp --region eu-west-1 --recursive ./app/static s3://${DNS_NAME}-static
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: venv ## Run tests
|
test: venv ## Run tests
|
||||||
./scripts/run_tests.sh
|
./scripts/run_tests.sh
|
||||||
@@ -199,7 +203,7 @@ generate-manifest:
|
|||||||
<(${DECRYPT_CMD} ${NOTIFY_CREDENTIALS}/credentials/${CF_SPACE}/paas/environment-variables.gpg)
|
<(${DECRYPT_CMD} ${NOTIFY_CREDENTIALS}/credentials/${CF_SPACE}/paas/environment-variables.gpg)
|
||||||
|
|
||||||
.PHONY: cf-deploy
|
.PHONY: cf-deploy
|
||||||
cf-deploy: ## Deploys the app to Cloud Foundry
|
cf-deploy: upload-static ## Deploys the app to Cloud Foundry
|
||||||
$(if ${CF_SPACE},,$(error Must specify CF_SPACE))
|
$(if ${CF_SPACE},,$(error Must specify CF_SPACE))
|
||||||
@cf app --guid notify-admin || exit 1
|
@cf app --guid notify-admin || exit 1
|
||||||
cf rename notify-admin notify-admin-rollback
|
cf rename notify-admin notify-admin-rollback
|
||||||
|
|||||||
Reference in New Issue
Block a user