-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (39 loc) · 1.31 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
INSTALLATION_ID=dev
ENVIRONMENT=test
CONTAINER_REPOSITORY_NAME=docker-images
TERRAFORM_VERSION=0.13.5
TFENV_VERSION=2.0.0
PACKAGES=curl python3 python3-pip golang jq unzip
PIP_PACKAGES=boto3 awscli
SLACK_CONFIGURATION_NAME=
SLACK_CHANNEL_ID=
SLACK_WORKSPACE_ID=
CHATBOT_LOGGING_LEVEL=NONE
check-region-profile-set:
if [ -z "${AWS_REGION}" ]; then \
echo "AWS_REGION environment variable is not set."; exit 1; \
fi
if [ -z "${AWS_PROFILE}" ]; then \
echo "AWS_PROFILE environment variable is not set."; exit 1; \
fi
.PHONY: cfn-lint
cfn-lint: cfn-lint codebuild.yml
deploy: codebuild.yml
aws \
--region $(AWS_REGION) \
cloudformation deploy \
--template-file $< \
--stack-name bake-docker-image \
--capabilities CAPABILITY_NAMED_IAM \
--no-fail-on-empty-changeset \
--tags Team=DevOps Application=DockerImageAutomation \
--parameter-overrides \
"InstallationId=$(INSTALLATION_ID)" \
"Environment=$(ENVIRONMENT)" \
"ContainerRepositoryName=$(CONTAINER_REPOSITORY_NAME) \
"TerraformVersion=$(TERRAFORM_VERSION) \
"TfenvVersion=$(TFENV_VERSION) \
"SlackChannelId=$(SLACK_CHANNEL_ID) \
"SlackWorkspaceId=$(SLACK_WORKSPACE_ID) \
"SlackConfigurationName=$(SLACK_CONFIGURATION_NAME) \
"ChatBotLoggingLevel=$(CHATBOT_LOGGING_LEVEL)