-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/nr_tags_optional
- Loading branch information
Showing
8 changed files
with
1,784 additions
and
1,379 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: New Relic - AWS Logs Ingestion - Pull Request | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
poetry-version: ["1.4"] | ||
os: [ubuntu-20.04] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Install Project | ||
run: poetry install --no-interaction | ||
- name: Lint | ||
run: | | ||
poetry run flake8 src test | ||
poetry run black --check src test | ||
test: | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
poetry-version: ["1.4"] | ||
os: [ubuntu-20.04, ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install Project | ||
run: poetry install --no-interaction | ||
- name: Test | ||
run: poetry run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: New Relic - AWS Logs Ingestion - Release | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
poetry-version: ["1.4"] | ||
os: [ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Install Project | ||
run: poetry install --no-interaction | ||
- name: Test | ||
run: poetry run pytest | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_SAR_PUBLISHER_ROLE }} | ||
aws-region: us-east-1 | ||
- name: Build & Package & Publish | ||
run: | | ||
poetry export -o src/requirements.txt --without-hashes | ||
poetry run sam validate | ||
poetry run sam build | ||
poetry run sam package --s3-bucket nr-serverless-applications --output-template-file packaged.yaml | ||
poetry run sam publish --region us-east-1 --template packaged.yaml | ||
notify: | ||
runs-on: ubuntu-latest | ||
needs: release | ||
steps: | ||
- name: Send release details to Slack workflow | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"releaseUrl": ":github: ${{ github.event.release.html_url }}", | ||
"releaseName": "${{ github.event.release.name }}", | ||
"productName": "${{ env.PRODUCT_NAME }}", | ||
"productUrl": "${{ env.PRODUCT_URL }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
PRODUCT_NAME: NewRelic-log-ingestion | ||
PRODUCT_URL: https://serverlessrepo.aws.amazon.com/applications/us-east-1/463657938898/NewRelic-log-ingestion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.