forked from newrelic/aws-log-ingestion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Wiring Up Circle CI * Fix DEVELOPER.md typo
- Loading branch information
Showing
4 changed files
with
114 additions
and
17 deletions.
There are no files selected for viewing
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,109 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/python:3.7 | ||
environment: | ||
PIPENV_VENV_IN_PROJECT: true | ||
steps: | ||
- checkout | ||
- run: sudo chown -R circleci:circleci /usr/local/bin | ||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages | ||
- restore_cache: | ||
key: deps-{{ .Branch }}-{{ checksum "Pipfile.lock" }} | ||
- run: | ||
command: | | ||
sudo pip install pipenv | ||
pipenv install --dev --deploy | ||
- save_cache: | ||
key: deps-{{ .Branch }}-{{ checksum "Pipfile.lock" }} | ||
paths: | ||
- ".venv" | ||
- "/usr/local/bin" | ||
- "/usr/local/lib/python3.7/site-packages" | ||
|
||
lint: | ||
docker: | ||
- image: circleci/python:3.7 | ||
environment: | ||
PIPENV_VENV_IN_PROJECT: true | ||
steps: | ||
- checkout | ||
- run: sudo chown -R circleci:circleci /usr/local/bin | ||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages | ||
- restore_cache: | ||
key: deps-{{ .Branch }}-{{ checksum "Pipfile.lock" }} | ||
- run: | ||
command: | | ||
pipenv run flake8 src test | ||
pipenv run black --check src test | ||
test: | ||
docker: | ||
- image: circleci/python:3.7 | ||
environment: | ||
PIPENV_VENV_IN_PROJECT: true | ||
steps: | ||
- checkout | ||
- run: sudo chown -R circleci:circleci /usr/local/bin | ||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages | ||
- restore_cache: | ||
key: deps-{{ .Branch }}-{{ checksum "Pipfile.lock" }} | ||
- run: | ||
command: pipenv run pytest | ||
|
||
release: | ||
docker: | ||
- image: circleci/python:3.7 | ||
environment: | ||
PIPENV_VENV_IN_PROJECT: true | ||
steps: | ||
- checkout | ||
- run: sudo chown -R circleci:circleci /usr/local/bin | ||
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages | ||
- run: | ||
name: Install release dependencies | ||
command: | | ||
sudo pip install -q -U aws-sam-cli | ||
pipenv lock --requirements --keep-outdated > ./src/requirements.txt | ||
sam validate | ||
sam build | ||
sam package --s3-bucket nr-serverless-applications --output-template-file packaged.yaml | ||
sam publish --region us-east-1 --template packaged.yaml | ||
workflows: | ||
version: 2 | ||
build-all: | ||
jobs: | ||
- build: | ||
filters: | ||
branches: | ||
only: /.*/ | ||
tags: | ||
only: /.*/ | ||
- lint: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: /.*/ | ||
tags: | ||
only: /.*/ | ||
- test: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: /.*/ | ||
tags: | ||
only: /.*/ | ||
- release: | ||
requires: | ||
- build | ||
- lint | ||
- test | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^v.*/ |
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
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 |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
pipenv lock --requirements --keep-outdated > ./src/requirements.txt | ||
|
||
sam build --use-container | ||
|
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 |
---|---|---|
|
@@ -16,6 +16,3 @@ exclude = ''' | |
| dist | ||
)/ | ||
''' | ||
|
||
[tool.flake8] | ||
max-line-length = 88 |