Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama authored Oct 15, 2024
2 parents ac75f35 + d91be04 commit 421620a
Show file tree
Hide file tree
Showing 35 changed files with 2,797 additions and 1,387 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build CloudFormation Lambda function
working-directory: ./cfn-lambda
run: |
cd cfn-lambda
cp -R ../common ./common
cp -R ../logger ./logger
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bootstrap .
zip -x "*_test.go" -r ../cfn-lambda.zip .
cd ..
- name: Build and Zip EventBridge Lambda function with common dependencies
- name: Build and Zip LogGroups events Lambda function with common dependencies
working-directory: ./log-group-events-lambda
run: |
cd eventbridge-lambda
cp -R ../common ./common
cp -R ../logger ./logger
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bootstrap .
zip -x "*_test.go" -r ../eventbridge-lambda.zip .
zip -x "*_test.go" -r ../log-group-events-lambda.zip .
cd ..
- name: Upload Lambdas ZIP as Artifact
Expand All @@ -62,12 +64,14 @@ jobs:
name: lambdas
path: |
cfn-lambda.zip
eventbridge-lambda.zip
log-group-events-lambda.zip
- name: Cleanup common folders
run: |
rm -rf cfn-lambda/common
rm -rf eventbridge-lambda/common
rm -rf cfn-lambda/logger
rm -rf log-group-events-lambda/common
rm -rf log-group-events-lambda/logger
# Upload built artifacts to S3
upload_to_buckets:
Expand Down Expand Up @@ -127,9 +131,9 @@ jobs:
run: |
aws s3 cp ./cfn-lambda.zip s3://logzio-aws-integrations-${{ matrix.aws_region }}/firehose-logs/${{ github.event.release.tag_name }}/cfn-lambda.zip --acl public-read
- name: Upload EventBridge Lambda ZIP to S3
- name: Upload LogGroups events Lambda ZIP to S3
run: |
aws s3 cp ./eventbridge-lambda.zip s3://logzio-aws-integrations-${{ matrix.aws_region }}/firehose-logs/${{ github.event.release.tag_name }}/eventbridge-lambda.zip --acl public-read
aws s3 cp ./log-group-events-lambda.zip s3://logzio-aws-integrations-${{ matrix.aws_region }}/firehose-logs/${{ github.event.release.tag_name }}/log-group-events-lambda.zip --acl public-read
- name: Prepare SAM Template
run: |
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Test CFN lambda
working-directory: ./cfn-lambda/handler
run: go test -v -race -covermode=atomic -coverprofile=coverage.out
- name: Test EventBridge lambda
working-directory: ./eventbridge-lambda/handler
- name: Test LogGroups events lambda lambda
working-directory: ./log-group-events-lambda/handler
run: go test -v -race -covermode=atomic -coverprofile=coverage.out
- name: Test common functions
working-directory: ./common
Expand Down Expand Up @@ -54,14 +54,16 @@ jobs:
working-directory: ./cfn-lambda
run: |
cp -R ../common ./common
cp -R ../logger ./logger
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bootstrap .
zip -x "*_test.go" -r ../cfn-lambda.zip .
- name: Build and Zip EventBridge Lambda function
working-directory: ./eventbridge-lambda
- name: Build and Zip LogGroups events Lambda function
working-directory: ./log-group-events-lambda
run: |
cp -R ../common ./common
cp -R ../logger ./logger
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bootstrap .
zip -x "*_test.go" -r ../eventbridge-lambda.zip .
zip -x "*_test.go" -r ../log-group-events-lambda.zip .
# Setup and upload to AWS
- name: Setup AWS
Expand All @@ -73,7 +75,7 @@ jobs:
- name: Upload ZIP to S3
run: |
aws s3 cp ./cfn-lambda.zip s3://logzio-aws-integrations-${{ env.AWS_REGION }}/firehose-logs/${{ env.TEST_VERSION }}/cfn-lambda.zip --acl public-read
aws s3 cp ./eventbridge-lambda.zip s3://logzio-aws-integrations-${{ env.AWS_REGION }}/firehose-logs/${{ env.TEST_VERSION }}/eventbridge-lambda.zip --acl public-read
aws s3 cp ./log-group-events-lambda.zip s3://logzio-aws-integrations-${{ env.AWS_REGION }}/firehose-logs/${{ env.TEST_VERSION }}/log-group-events-lambda.zip --acl public-read
# Generate test data
- name: Create API Gateway service
Expand Down
92 changes: 48 additions & 44 deletions README.md

Large diffs are not rendered by default.

Loading

0 comments on commit 421620a

Please sign in to comment.