Guest User

Untitled

a guest
Jan 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. # Makefile
  2. COMMITID=$(shell git rev-parse HEAD)
  3.  
  4. ifndef AWS_DEFAULT_REGION
  5. AWS_DEFAULT_REGION = $(shell aws configure get region)
  6. endif
  7.  
  8. ifndef AWS_REGION
  9. AWS_REGION = ${AWS_DEFAULT_REGION}
  10. endif
  11.  
  12. all : deploy-stack
  13. .PHONY : all
  14.  
  15.  
  16. deploy-stack: env-STACK_NAME
  17. aws cloudformation deploy --template-file "$(PWD)/master.yml" \
  18. --stack-name $(STACK_NAME) \
  19. --capabilities CAPABILITY_NAMED_IAM
  20.  
  21. delete-stack: env-STACK_NAME
  22. aws cloudformation delete-stack \
  23. --stack-name $(STACK_NAME)
  24.  
  25. # Check for specific environment variables
  26. env-%:
  27. @ if [ "${${*}}" = "" ]; then \
  28. echo "Environment variable $* not set"; \
  29. exit 1; \
  30. fi
Add Comment
Please, Sign In to add comment