Skip to content

Commit 21e9e29

Browse files
committed
separating build process
1 parent a047924 commit 21e9e29

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/run-e2e-tests.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: E2E Test Workflow For Firehose
22

33
on:
4-
push:
4+
pull_request:
55
branches:
66
- main
77
- develop
@@ -37,5 +37,6 @@ jobs:
3737
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
3838
run: |
3939
cd e2e_tests/
40+
./build_template.sh
4041
./firehose_e2e_tests.sh ${{ matrix.test-case }}
4142

e2e_tests/build_template.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#Building and deploying the changes
2+
BASE_NAME=$(basename "$TEMPLATE_FILE_NAME" .yaml)
3+
BUILD_DIR="$BUILD_DIR_BASE/$BASE_NAME"
4+
5+
# Build and package the SAM template
6+
sam build --template-file "../$TEMPLATE_FILE_NAME" --build-dir "$BUILD_DIR"
7+
sam package --s3-bucket "$S3_BUCKET" --template-file "$BUILD_DIR/template.yaml" --output-template-file "$BUILD_DIR/$TEMPLATE_FILE_NAME"

e2e_tests/firehose_e2e_tests.sh

+1-10
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,8 @@ COMMON_ATTRIBUTES=$(<common_attribute.json)
153153
# Delete the Firehose stack
154154
delete_stack "$FIREHOSE_STACK_NAME_4"
155155
}
156-
157-
158-
159-
BASE_NAME=$(basename "$TEMPLATE_FILE_NAME" .yaml)
160-
BUILD_DIR="$BUILD_DIR_BASE/$BASE_NAME"
161-
162-
# Build and package the SAM template
163-
sam build --template-file "../$TEMPLATE_FILE_NAME" --build-dir "$BUILD_DIR"
164-
sam package --s3-bucket "$S3_BUCKET" --template-file "$BUILD_DIR/template.yaml" --output-template-file "$BUILD_DIR/$TEMPLATE_FILE_NAME"
165156

166-
Run the test cases
157+
#Run the test cases
167158
case $1 in
168159
test-without-filter)
169160
test_logs_without_filter_pattern

0 commit comments

Comments
 (0)