Skip to content

Commit

Permalink
feat(integ): add ability to use hook function before each component t…
Browse files Browse the repository at this point in the history
…est (#155)
  • Loading branch information
kozlove-aws authored Oct 7, 2020
1 parent 2cfdac2 commit 792586e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integ/scripts/bash/rfdk-integ-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ export INFRASTRUCTURE_DEPLOY_FINISH_TIME=$SECONDS
for COMPONENT in **/cdk.json; do
COMPONENT_ROOT="$(dirname "$COMPONENT")"
COMPONENT_NAME=$(basename "$COMPONENT_ROOT")
# Invoke hook function if it is exported and name is defined in PRE_COMPONENT_HOOK variable
if [ -n "$PRE_COMPONENT_HOOK" ] && [ "$(type -t $PRE_COMPONENT_HOOK)" == "function" ]
then
$PRE_COMPONENT_HOOK $COMPONENT_NAME
fi

# Use a pattern match to exclude the infrastructure app from the results
export ${COMPONENT_NAME}_START_TIME=$SECONDS
if [[ "$COMPONENT_NAME" != _* ]]; then
Expand Down

0 comments on commit 792586e

Please sign in to comment.