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
21 changed files
with
483 additions
and
74 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
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,9 +1,8 @@ | ||
[bumpversion] | ||
current_version = 1.0.0 | ||
current_version = 1.0.1 | ||
commit = False | ||
tag = False | ||
|
||
[bumpversion:file:setup.py] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
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,256 @@ | ||
# | ||
# Globality autogenerated CircleCI configuration | ||
# | ||
# This file is auto generated with globality-build. | ||
# You should not make any changes to this file manually | ||
# | ||
# Any changes made to this file will be overwritten in the | ||
# next version of the build. | ||
# | ||
# See: http://github.com/globality-corp/globality-build | ||
# | ||
# | ||
|
||
defaults: &defaults | ||
working_directory: ~/repo | ||
docker: | ||
- image: ${AWS_ECR_DOMAIN}/globality-build:2020.37.0 | ||
aws_auth: | ||
aws_access_key_id: ${AWS_ACCESS_KEY_ID} | ||
aws_secret_access_key: ${AWS_SECRET_ACCESS_KEY} | ||
environment: | ||
EXTRA_INDEX_URL: "InjectedDuringRuntime" | ||
AWS_ECR_DOMAIN: "InjectedDuringRuntime" | ||
JFROG_AUTH: "InjectedDuringRuntime" | ||
PYPI_USERNAME: "InjectedDuringRuntime" | ||
PYPI_PASSWORD: "InjectedDuringRuntime" | ||
|
||
deploy_defaults: &deploy_defaults | ||
working_directory: ~/repo | ||
docker: | ||
- image: ${AWS_ECR_DOMAIN}/globality-build:2020.37.0 | ||
aws_auth: | ||
aws_access_key_id: ${AWS_ACCESS_KEY_ID} | ||
aws_secret_access_key: ${AWS_SECRET_ACCESS_KEY} | ||
environment: | ||
EXTRA_INDEX_URL: "InjectedDuringRuntime" | ||
AWS_ECR_DOMAIN: "InjectedDuringRuntime" | ||
JFROG_AUTH: "InjectedDuringRuntime" | ||
PYPI_USERNAME: "InjectedDuringRuntime" | ||
PYPI_PASSWORD: "InjectedDuringRuntime" | ||
|
||
|
||
whitelist: &whitelist | ||
paths: | ||
. | ||
|
||
version: 2 | ||
|
||
jobs: | ||
checkout: | ||
<<: *defaults | ||
|
||
steps: | ||
- checkout | ||
|
||
- persist_to_workspace: | ||
root: ~/repo | ||
<<: *whitelist | ||
|
||
build_docker: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
|
||
- run: | ||
name: Login AWS ECR | ||
command: | | ||
eval $(aws ecr get-login --no-include-email) | ||
- run: | ||
name: Build Docker - Application Service Code | ||
command: | | ||
# pwd is here to prevent error when pre_docker_build returns nothing | ||
pwd | ||
docker build --tag $AWS_ECR_DOMAIN/python-library:$CIRCLE_SHA1 \ | ||
--build-arg BUILD_NUM=$CIRCLE_BUILD_NUM \ | ||
--build-arg SHA1=$CIRCLE_SHA1 \ | ||
--build-arg EXTRA_INDEX_URL=$EXTRA_INDEX_URL \ | ||
--build-arg JFROG_AUTH=$JFROG_AUTH . | ||
docker push $AWS_ECR_DOMAIN/python-library:$CIRCLE_SHA1 | ||
test: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker | ||
- run: | ||
name: Login AWS ECR | ||
command: | | ||
eval $(aws ecr get-login --no-include-email) | ||
- run: | ||
name: Copy service tests to volume | ||
command: | | ||
docker create -v /src/microcosm_resourcesync/tests/ --name service_tests alpine:3.11 /bin/true | ||
docker cp $(pwd)/microcosm_resourcesync/tests service_tests:/src/microcosm_resourcesync/ | ||
- run: | ||
name: Run Test | ||
command: | | ||
docker run -it --volumes-from service_tests ${AWS_ECR_DOMAIN}/python-library:${CIRCLE_SHA1} test | ||
lint: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker | ||
- run: | ||
name: Login AWS ECR | ||
command: | | ||
eval $(aws ecr get-login --no-include-email) | ||
- run: | ||
name: Copy service tests to volume | ||
command: | | ||
docker create -v /src/microcosm_resourcesync/tests/ --name service_tests alpine:3.11 /bin/true | ||
docker cp $(pwd)/microcosm_resourcesync/tests service_tests:/src/microcosm_resourcesync/ | ||
- run: | ||
name: Run Lint | ||
command: | | ||
docker run -it --volumes-from service_tests ${AWS_ECR_DOMAIN}/python-library:${CIRCLE_SHA1} lint | ||
typehinting: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker | ||
- run: | ||
name: Login AWS ECR | ||
command: | | ||
eval $(aws ecr get-login --no-include-email) | ||
- run: | ||
name: Copy service tests to volume | ||
command: | | ||
docker create -v /src/microcosm_resourcesync/tests/ --name service_tests alpine:3.11 /bin/true | ||
docker cp $(pwd)/microcosm_resourcesync/tests service_tests:/src/microcosm_resourcesync/ | ||
- run: | ||
name: Run Typehinting | ||
command: | | ||
docker run -it --volumes-from service_tests ${AWS_ECR_DOMAIN}/python-library:${CIRCLE_SHA1} typehinting | ||
deploy_jfrog_rc: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: Deploy | ||
command: | | ||
echo "Not publishing package!" | ||
publish_library: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: Publish | ||
command: | | ||
echo "[distutils]" > ~/.pypirc | ||
echo "index-servers =" >> ~/.pypirc | ||
echo " pypi " >> ~/.pypirc | ||
echo >> ~/.pypirc | ||
echo "[pypi]" >> ~/.pypirc | ||
echo "repository:https://upload.pypi.org/legacy/" >> ~/.pypirc | ||
echo "username:$PYPI_USERNAME" >> ~/.pypirc | ||
echo "password:$PYPI_PASSWORD" >> ~/.pypirc | ||
echo >> ~/.pypirc | ||
version=$(cat .bumpversion.cfg | awk '/current_version / {print $3}') | ||
python setup.py register -r pypi | ||
python setup.py sdist | ||
twine upload --repository pypi dist/microcosm-resourcesync-${version}.tar.gz | ||
workflows: | ||
version: 2 | ||
|
||
build-and-release: | ||
jobs: | ||
- checkout: | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- build_docker: | ||
requires: | ||
- checkout | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- lint: | ||
requires: | ||
- build_docker | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- test: | ||
requires: | ||
- build_docker | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- deploy_jfrog_rc: | ||
requires: | ||
- test | ||
- lint | ||
- typehinting | ||
- typehinting: | ||
requires: | ||
- build_docker | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- publish_library: | ||
requires: | ||
- test | ||
- lint | ||
- typehinting | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^[0-9]+(\.[0-9]+)*/ | ||
|
||
|
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,13 @@ | ||
* | ||
!microcosm_resourcesync | ||
microcosm_resourcesync/tests | ||
!dist/*-none-any.whl | ||
!entrypoint.sh | ||
!MANIFEST.in | ||
!README.md | ||
!requirements.txt | ||
!setup.py | ||
!setup.cfg | ||
**/*.pyc | ||
**/*~ | ||
|
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 |
---|---|---|
|
@@ -92,3 +92,5 @@ docs/_build/ | |
|
||
# PyBuilder | ||
target/ | ||
|
||
.mypy_cache |
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,10 @@ | ||
{ | ||
"params": { | ||
"name": "microcosm-resourcesync", | ||
"pypi": { | ||
"repository": "pypi" | ||
} | ||
}, | ||
"type": "python-library", | ||
"version": "2020.37.0" | ||
} |
Oops, something went wrong.