|
|
@ -9,17 +9,11 @@ jobs: # A basic unit of work in a run |
|
|
auth: |
|
|
auth: |
|
|
username: $DOCKERHUB_USERNAME |
|
|
username: $DOCKERHUB_USERNAME |
|
|
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference |
|
|
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference |
|
|
environment: # environment variables for primary container |
|
|
|
|
|
PIPENV_VENV_IN_PROJECT: true |
|
|
|
|
|
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable |
|
|
|
|
|
# CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/ |
|
|
# CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/ |
|
|
- image: circleci/postgres:9.6.9-alpine |
|
|
- image: circleci/postgres:9.6.9-alpine |
|
|
auth: |
|
|
auth: |
|
|
username: $DOCKERHUB_USERNAME |
|
|
username: $DOCKERHUB_USERNAME |
|
|
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference |
|
|
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference |
|
|
environment: # environment variables for the Postgres container. |
|
|
|
|
|
POSTGRES_USER: root |
|
|
|
|
|
POSTGRES_DB: circle_test |
|
|
|
|
|
steps: # steps that comprise the `build` job |
|
|
steps: # steps that comprise the `build` job |
|
|
- checkout # check out source code to working directory |
|
|
- checkout # check out source code to working directory |
|
|
# - run: sudo chown -R circleci:circleci /usr/local/bin |
|
|
# - run: sudo chown -R circleci:circleci /usr/local/bin |
|
|
@ -29,9 +23,9 @@ jobs: # A basic unit of work in a run |
|
|
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} |
|
|
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} |
|
|
- run: |
|
|
- run: |
|
|
command: | |
|
|
command: | |
|
|
export FLASK_APP=autoapp.py |
|
|
|
|
|
sudo pip install pipenv |
|
|
|
|
|
pipenv install |
|
|
|
|
|
|
|
|
python3 -m venv venv |
|
|
|
|
|
. venv/bin/activate |
|
|
|
|
|
pip install -r requirements/dev.txt |
|
|
- save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key |
|
|
- save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key |
|
|
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} |
|
|
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} |
|
|
paths: |
|
|
paths: |
|
|
@ -61,9 +55,6 @@ jobs: # A basic unit of work in a run |
|
|
- run: |
|
|
- run: |
|
|
name: bd upgrade |
|
|
name: bd upgrade |
|
|
command: | |
|
|
command: | |
|
|
python3 -m venv venv |
|
|
|
|
|
. venv/bin/activate |
|
|
|
|
|
pip install -r requirements/dev.txt |
|
|
|
|
|
. venv/bin/activate |
|
|
. venv/bin/activate |
|
|
sleep 1 |
|
|
sleep 1 |
|
|
flask db stamp head |
|
|
flask db stamp head |
|
|
|