-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
49 lines (41 loc) · 1.8 KB
/
deploy.sh
File metadata and controls
49 lines (41 loc) · 1.8 KB
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
43
44
45
46
47
48
49
if [ -z "$deployed_environment" ]
then
echo "\$deployed_environment environment variable is unset!"
echo "Aborting deployment."
exit
fi
product_name=$focusmark_productname
cd src
# UserPool deployment
stack_name_identity=$product_name-"$deployed_environment"-cf-auth-customeridentity
template_file_identity='identity.yaml'
echo Deploying the $stack_name_identity stack into $deployed_environment
cfn-lint $template_file_identity
aws cloudformation deploy \
--template-file $template_file_identity \
--stack-name $stack_name_identity \
--parameter-overrides \
TargetEnvironment=$deployed_environment \
ProductName=$product_name
# UserPool Resource Servers. This Stack must exist before Client Apps can be deployed as they depend on the Scopes defined in the Resource Server Stack.
stack_name_resource_servers=$product_name-"$deployed_environment"-cf-auth-resourceservers
template_file_resource_servers='resource-servers.yaml'
echo Deploying the $stack_name_resource_servers stack into $deployed_environment
cfn-lint $template_file_resource_servers
aws cloudformation deploy \
--template-file $template_file_resource_servers \
--stack-name $stack_name_resource_servers \
--parameter-overrides \
TargetEnvironment=$deployed_environment \
ProductName=$product_name
# Client Apps deployment
stack_name_client_apps=$product_name-"$deployed_environment"-cf-auth-clientapps
template_file_client_apps='client-apps.yaml'
echo Deploying the $stack_name_client_apps stack into $deployed_environment
cfn-lint $template_file_client_apps
aws cloudformation deploy \
--template-file $template_file_client_apps \
--stack-name $stack_name_client_apps \
--parameter-overrides \
TargetEnvironment=$deployed_environment \
ProductName=$product_name