Skip to content

Commit

Permalink
Merge branch 'master' into feature/nr_tags_optional
Browse files Browse the repository at this point in the history
  • Loading branch information
adiesner authored Jul 10, 2023
2 parents 48d7de1 + 1043b44 commit d26a951
Show file tree
Hide file tree
Showing 8 changed files with 1,784 additions and 1,379 deletions.
96 changes: 0 additions & 96 deletions .circleci/config.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/pr.yaml
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
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
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
7 changes: 5 additions & 2 deletions Developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

# Publishing a new version

To publish a new version [create a release](https://github.com/newrelic/aws-log-ingestion/releases/new)
and specify a tag that matches the `SemanticVersion` that appears in the `template.yml`
The version number needs to be bumped in `pyproject.toml` and `template.yaml` (in `Metadata.SemanticVersion`).
Note that both should match.

Then, to publish a new version, [create a release](https://github.com/newrelic/aws-log-ingestion/releases/new)
and specify a tag that matches the `SemanticVersion` that appears in `template.yml` (and `pyproject.toml`)
but prefixed with a `v`. For example, if the `SemanticVersion` is `1.2.3` then your
release tag should be `v1.2.3`.

Expand Down
Loading

0 comments on commit d26a951

Please sign in to comment.