Skip to content

Commit

Permalink
Remove debug from the entrypoint script
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-szlapa committed Oct 8, 2024
1 parent 0fe1a0c commit 8aa189c
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions docker/entrypoint.sh
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

0 comments on commit 8aa189c

Please sign in to comment.