-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove debug from the entrypoint script
- Loading branch information
1 parent
0fe1a0c
commit 8aa189c
Showing
1 changed file
with
4 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Enable command tracing for debugging | ||
set -x | ||
|
||
# Log a message when the script starts | ||
echo "Running entrypoint.sh..." | ||
|
||
# Source the ASDF environment for node | ||
source /home/cdkuser/.asdf/asdf.sh | ||
|
||
# Debugging output for environment variables | ||
echo "SHOW_DIFF: ${SHOW_DIFF}" | ||
echo "DEPLOY_CODE: ${DEPLOY_CODE}" | ||
|
||
# Fetch and export the EPS Zone ID and domain from AWS CloudFormation exports | ||
echo "Fetching epsZoneId and epsDomain from AWS CloudFormation..." | ||
epsZoneId=$(aws cloudformation list-exports --output json | jq -r '.Exports[] | select(.Name == "eps-route53-resources:EPS-ZoneID") | .Value' | grep -o '[^:]*$') | ||
epsDomain=$(aws cloudformation list-exports --output json | jq -r '.Exports[] | select(.Name == "eps-route53-resources:EPS-domain") | .Value' | grep -o '[^:]*$') | ||
echo "epsZoneId: ${epsZoneId}" | ||
echo "epsDomain: ${epsDomain}" | ||
|
||
# Export variables for further use in the make commands | ||
export epsZoneId | ||
export epsDomain | ||
export REQUIRE_APPROVAL=never | ||
|
||
# Conditional logic to show diff or deploy | ||
if [ "${SHOW_DIFF}" = "true" ]; then | ||
echo "Running CDK Diff..." | ||
if [ "${SHOW_DIFF}" = "true" ] | ||
then | ||
make cdk-diff | ||
else | ||
echo "Skipping CDK Diff." | ||
fi | ||
|
||
if [ "${DEPLOY_CODE}" = "true" ]; then | ||
echo "Running CDK Deploy..." | ||
if [ "${DEPLOY_CODE}" = "true" ] | ||
then | ||
make cdk-deploy | ||
else | ||
echo "Skipping CDK Deploy." | ||
fi |