New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circle 1->2 #42
Merged
Merged
Circle 1->2 #42
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c8ca27d
Circle 2.0 configuration
moshez dbf9d97
Remove Circle 1.0 configuration
moshez ae24de1
.gitignore and .globality/build.json
5680b1d
first approximation
c09b102
explicit config
dfb696a
fix lib name
ddf110e
+build base docker
2eb84da
fix circleci config
3017cc3
no match
7b16cc6
no match
51247d0
ignore branches
2812171
Add empty MANIFEST.in
4898578
temp -- add g-b rc3
e6978f9
temp -- add latest ecr
c371906
temp -- add g-b rc5
62d5907
regenerate with app_name
2b004bf
make tests a bit looser
863e52c
allow non-localhost
ed7c90f
Bump version
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 1.6.0 | ||
current_version = 1.6.1 | ||
commit = False | ||
tag = False | ||
|
||
|
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,179 @@ | ||
# | ||
# 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-buid | ||
# | ||
# | ||
|
||
defaults: &defaults | ||
working_directory: ~/repo | ||
docker: | ||
- image: ${AWS_ECR_DOMAIN}/globality-build:stable | ||
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:stable | ||
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_base_docker: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker | ||
|
||
- run: | ||
name: Build Base Docker | ||
# install dependencies for loading ecs task definitions | ||
command: | | ||
eval $(aws ecr get-login --no-include-email) | ||
sudo pip install --upgrade elcaminoreal | ||
sudo pip install --extra-index-url $EXTRA_INDEX_URL globality-build==2018.23.1rc5 | ||
python -m middlefield globality build build-gen --config .globality/build.json | ||
python -m middlefield globality build docker-base --repo microcosm-postgres | ||
python -m middlefield globality build docker --repo microcosm-postgres | ||
|
||
test: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker | ||
|
||
- run: | ||
name: pull and run database | ||
command: | | ||
docker pull postgres | ||
docker run -d --name microcosm_postgres_db -e POSTGRES_DB=example_test_db -e POSTGRES_USER=example postgres | ||
- run: | ||
name: Test code | ||
command: | | ||
docker create -v /src/microcosm_postgres/tests/ --name service_tests alpine:3.4 /bin/true | ||
docker cp $(pwd)/microcosm_postgres/tests service_tests:/src/microcosm_postgres/ | ||
eval $(aws ecr get-login --no-include-email) | ||
docker pull ${AWS_ECR_DOMAIN}/microcosm-postgres:${CIRCLE_SHA1} | ||
docker run -it --link microcosm_postgres_db:postgres -e EXAMPLE__POSTGRES__HOST=postgres --volumes-from service_tests ${AWS_ECR_DOMAIN}/microcosm-postgres:${CIRCLE_SHA1} test | ||
|
||
lint: | ||
<<: *defaults | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
|
||
- setup_remote_docker | ||
|
||
- run: | ||
name: Run Lint | ||
command: | | ||
docker create -v /src/microcosm-postgres/tests/ --name service_tests alpine:3.4 /bin/true | ||
docker cp $(pwd)/microcosm_postgres/tests service_tests:/src/microcosm_postgres/ | ||
eval $(aws ecr get-login --no-include-email) | ||
docker pull ${AWS_ECR_DOMAIN}/microcosm-postgres:${CIRCLE_SHA1} | ||
docker run -it --volumes-from service_tests ${AWS_ECR_DOMAIN}/microcosm-postgres:${CIRCLE_SHA1} lint | ||
|
||
|
||
deploy: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: Deploy | ||
command: | | ||
echo "[distutils]" > ~/.pypirc | ||
echo "index-servers =" >> ~/.pypirc | ||
echo " pypi" >> ~/.pypirc | ||
echo >> ~/.pypirc | ||
echo "[pypi]" >> ~/.pypirc | ||
echo "username:$PYPI_USERNAME" >> ~/.pypirc | ||
echo "password:$PYPI_PASSWORD" >> ~/.pypirc | ||
echo >> ~/.pypirc | ||
python setup.py register -r pypi | ||
python setup.py sdist upload -r pypi | ||
|
||
workflows: | ||
version: 2 | ||
|
||
build-and-release: | ||
jobs: | ||
- checkout: | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- build_base_docker: | ||
requires: | ||
- checkout | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- lint: | ||
requires: | ||
- build_base_docker | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- test: | ||
requires: | ||
- build_base_docker | ||
filters: | ||
# run for all branches and tags | ||
tags: | ||
only: /.*/ | ||
- deploy: | ||
requires: | ||
- test | ||
- lint | ||
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 |
---|---|---|
|
@@ -92,3 +92,8 @@ docs/_build/ | |
|
||
# PyBuilder | ||
target/ | ||
|
||
/.dockerignore | ||
/Dockerfile.template | ||
/build.*/ | ||
/entrypoint.sh |
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,8 @@ | ||
{ | ||
"type": "python-library", | ||
"params": { | ||
"name": "microcosm-postgres", | ||
"app_name": "example", | ||
"database": "postgres" | ||
} | ||
} |
Empty file.
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I know. but I have to do one manual merge of something so I can know that the deploy flow works correctly before I can merge globality build.