Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
184 additions
and
160 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 |
---|---|---|
|
@@ -9,3 +9,4 @@ dist/ | |
dist-aws/ | ||
tests/db/ | ||
.pytest_cache | ||
vendor/ |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM python:3.6 | ||
|
||
ENV LD_LIBRARY_PATH /opt/lib/ | ||
|
||
RUN apt-get update && apt-get install -y unzip libaio1 | ||
RUN pip install --upgrade pip | ||
RUN pip install pipenv | ||
COPY vendor/instantclient-basiclite-linux.x64-18.3.0.0.0dbru.zip / | ||
RUN unzip -j instantclient-basiclite-linux.x64-18.3.0.0.0dbru.zip -d /opt/lib/ | ||
|
||
COPY Pipfile* / | ||
RUN pipenv install --system --deploy | ||
COPY dist/carbon*.whl / | ||
RUN pip install carbon*.whl | ||
|
||
ENTRYPOINT ["carbon"] | ||
CMD ["--help"] |
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 |
---|---|---|
@@ -1,29 +1,51 @@ | ||
.PHONY: all clean install release test tests update | ||
.PHONY: install deps wheel container dist clean test tests update | ||
SHELL=/bin/bash | ||
RELEASE_TYPE=patch | ||
S3_BUCKET=carbon-deploy | ||
LIBAIO_SO=libaio.so.1.0.1 | ||
ORACLE_ZIP=instantclient-basiclite-linux.x64-18.3.0.0.0dbru.zip | ||
ECR_REGISTRY=672626379771.dkr.ecr.us-east-1.amazonaws.com | ||
|
||
all: test | ||
install: | ||
pipenv install | ||
|
||
vendor/$(ORACLE_ZIP): | ||
aws s3 cp s3://$(S3_BUCKET)/$(ORACLE_ZIP) vendor/$(ORACLE_ZIP) | ||
|
||
deps: vendor/$(ORACLE_ZIP) | ||
|
||
wheel: | ||
pipenv run python setup.py bdist_wheel | ||
|
||
container: | ||
docker build -t $(ECR_REGISTRY)/carbon:latest \ | ||
-t $(ECR_REGISTRY)/carbon:`git describe --always` \ | ||
-t carbon:latest . | ||
|
||
dist: deps wheel container | ||
@tput setaf 2 | ||
@tput bold | ||
@echo "Finished building docker image. Try running:" | ||
@echo " $$ docker run --rm carbon:latest" | ||
@tput sgr0 | ||
|
||
clean: | ||
find . -name "*.pyc" -print0 | xargs -0 rm -f | ||
find . -name '__pycache__' -print0 | xargs -0 rm -rf | ||
rm -rf .coverage .tox *.egg-info .eggs build/ build-aws/ dist/ dist-aws/ | ||
rm -rf .coverage .tox *.egg-info .eggs build/ dist/ | ||
|
||
install: | ||
pipenv install | ||
distclean: clean | ||
rm -rf vendor/ | ||
|
||
test: | ||
tox | ||
|
||
tests: test | ||
|
||
release: | ||
pipenv run bumpversion $(RELEASE_TYPE) | ||
@tput setaf 2 | ||
@echo Built release for `git describe --tag`. Make sure to run: | ||
@echo " $$ git push origin `git rev-parse --abbrev-ref HEAD` tag `git describe --tag`" | ||
@tput sgr0 | ||
|
||
update: | ||
pipenv clean | ||
pipenv update --dev | ||
pipenv lock -r > requirements.txt | ||
|
||
publish: | ||
$(aws ecr get-login --no-include-email --region us-east-1) | ||
docker push $(ECR_REGISTRY)/carbon:latest | ||
docker push $(ECR_REGISTRY)/carbon:`git describe --always` |
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
Large diffs are not rendered by default.
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
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 |
---|---|---|
|
@@ -5,5 +5,3 @@ | |
A tool for generating people. | ||
""" | ||
|
||
__version__ = '1.2.0' |
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
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