Skip to content

Commit

Permalink
separating build process
Browse files Browse the repository at this point in the history
  • Loading branch information
hrai-nr committed Jan 21, 2025
1 parent a047924 commit 21e9e29
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/run-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: E2E Test Workflow For Firehose

on:
push:
pull_request:
branches:
- main
- develop
Expand Down Expand Up @@ -37,5 +37,6 @@ jobs:
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
run: |
cd e2e_tests/
./build_template.sh
./firehose_e2e_tests.sh ${{ matrix.test-case }}
7 changes: 7 additions & 0 deletions e2e_tests/build_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Building and deploying the changes
BASE_NAME=$(basename "$TEMPLATE_FILE_NAME" .yaml)
BUILD_DIR="$BUILD_DIR_BASE/$BASE_NAME"

# Build and package the SAM template
sam build --template-file "../$TEMPLATE_FILE_NAME" --build-dir "$BUILD_DIR"
sam package --s3-bucket "$S3_BUCKET" --template-file "$BUILD_DIR/template.yaml" --output-template-file "$BUILD_DIR/$TEMPLATE_FILE_NAME"
11 changes: 1 addition & 10 deletions e2e_tests/firehose_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,8 @@ COMMON_ATTRIBUTES=$(<common_attribute.json)
# Delete the Firehose stack
delete_stack "$FIREHOSE_STACK_NAME_4"
}



BASE_NAME=$(basename "$TEMPLATE_FILE_NAME" .yaml)
BUILD_DIR="$BUILD_DIR_BASE/$BASE_NAME"

# Build and package the SAM template
sam build --template-file "../$TEMPLATE_FILE_NAME" --build-dir "$BUILD_DIR"
sam package --s3-bucket "$S3_BUCKET" --template-file "$BUILD_DIR/template.yaml" --output-template-file "$BUILD_DIR/$TEMPLATE_FILE_NAME"

Run the test cases
#Run the test cases
case $1 in
test-without-filter)
test_logs_without_filter_pattern
Expand Down

0 comments on commit 21e9e29

Please sign in to comment.