-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
31 lines (26 loc) · 1.02 KB
/
deploy.sh
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
#!/bin/bash
################################################################################
# SCRIPTS TO DEPLOY THE CDK SOLUTION
# Santiago Garcia Arango Website (Portfolio)
################################################################################
# function to print headers
function headline(){
echo ""
echo "------------------------------------------------------------------------------"
echo "$1"
echo "------------------------------------------------------------------------------"
}
# ------------------------- VALIDATING PARAMETERS -------------------------
if [ $# -eq 0 ]
then
echo "ERROR: Please provide <DEPLOYMENT_ENVIRONMENT> as parameter to the script"
exit 1
fi
# Configure deployment environment for CDK deploy
export DEPLOYMENT_ENVIRONMENT=$1
# ------------------------- CDK DEPLOYMENT -------------------------
headline "CDK Deployment..."
# Move to "cdk" folder (where the IaC is located)
cd ./cdk || exit
echo "Deploying CDK solution from $(pwd)"
cdk deploy --require-approval never