Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hr temp #18

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Deploy AWS Unified Firehose
on:
push:
branches:
- main
- hr_temp

jobs:
build-and-deploy:
Expand All @@ -15,21 +15,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_S3_PUBLISHER_ROLE }}
aws-region: us-east-2

- name: Install AWS SAM CLI
- name: Check if version.cfg is updated
run: |
pip install aws-sam-cli

- name: Build SAM Application
run: sam build --template-file firehose-template.yaml --region us-east-2

- name: Package SAM Application
run: sam package --s3-bucket unified-lambda-serverless --output-template-file firehose-template.yaml --region us-east-2

- name: Upload CloudFormation Template to S3
run: aws s3 cp firehose-template.yaml s3://unified-lambda-serverless/firehose-template.yaml
if ! git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q "version.cfg"; then
echo "Error: version.cfg must be updated in this pull request."
exit 1
fi

- name: Update Instrumentation Version
run: |
version=$(grep 'instrumentation_version' version.cfg | cut -d '=' -f2)
sed -i "s/{{INSTRUMENTATION_VERSION}}/$version/" firehose-template.yaml
2 changes: 1 addition & 1 deletion firehose-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ Resources:
{"AttributeName": "aws.region", "AttributeValue": region},
{"AttributeName": "instrumentation.provider", "AttributeValue": "aws"},
{"AttributeName": "instrumentation.name", "AttributeValue": "firehose"},
{"AttributeName": "instrumentation.version", "AttributeValue": "1.0.0"},
{"AttributeName": "instrumentation.version", "AttributeValue": "{{INSTRUMENTATION_VERSION}}"},
{"AttributeName": "aws.realm", "AttributeValue": awsRealm}
]

Expand Down
1 change: 1 addition & 0 deletions version.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
instrumentation_version=1.0.0
Loading