Merge pull request #234 from dod-ccpo/circleci

Circleci
This commit is contained in:
Devon 2018-09-04 10:53:00 -04:00 committed by GitHub
commit 9fe139d5a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 9 deletions

65
.circleci/config.yml Normal file
View File

@ -0,0 +1,65 @@
version: 2.0
jobs:
build:
docker:
- image: registry.atat.codes:443/atat-app-builder:circleci
auth:
username: $REGISTRY_USERNAME
password: $REGISTRY_PASSWORD
environment:
KEEP_EXISTING_VENV: true
PGHOST: localhost
PGUSER: root
PGDATABASE: circle_test
REDIS_URI: redis://localhost:6379
- image: circleci/postgres:9.6.5-alpine-ram
- image: circleci/redis:4-alpine3.8
steps:
- checkout
- run:
name: "Clone Submodules"
command: |
git submodule update --init --recursive
- restore_cache:
name: "Load Cache: Pipenv References"
keys:
- pipenv-v1-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- pipenv-v1-{{ .Branch }}-
- pipenv-v1-
- restore_cache:
name: "Load Cache: Python Venv"
keys:
- venv-v1-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- venv-v1-{{ .Branch }}-
- venv-v1-
- restore_cache:
name: "Load Cache: Yarn"
keys:
- yarn-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-v1-{{ .Branch }}-
- yarn-v1-
- run: ./script/setup
- save_cache:
name: "Save Cache: Pipenv Refrences"
paths:
- ~/.local/share
key: pipenv-v1-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- save_cache:
name: "Save Cache: Python Venv"
paths:
- ./.venv
key: venv-v1-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- save_cache:
name: "Save Cache: Yarn"
paths:
- ~/.cache/yarn
key: yarn-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- disa-crls
- run: ./script/sync-crls
- save_cache:
paths:
- ./crl
key: disa-crls
- run: ./script/cibuild

2
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "script/include"]
path = script/include
url = git@github.com:dod-ccpo/scriptz.git
url = https://github.com/dod-ccpo/scriptz.git
branch = master

View File

@ -114,6 +114,12 @@ def make_config():
# ENV_CONFIG will override values in BASE_CONFIG.
config.read(config_files)
# Check for ENV variables as a final source of overrides
for confsetting in config.options("default"):
env_override = os.getenv(confsetting.upper())
if env_override:
config.set("default", confsetting, env_override)
# Assemble DATABASE_URI value
database_uri = (
"postgres://"

View File

@ -7,18 +7,12 @@ source "$(dirname "${0}")"/../script/include/global_header.inc.sh
# Run lint/style checks and unit tests
export FLASK_ENV=ci
# Enable database resetting
RESET_DB="true"
# Define all relevant python files and directories for this app
PYTHON_FILES="./app.py ./atst ./config"
PYTHON_FILES="./app.py ./atst/** ./config"
# Enable Python testing
RUN_PYTHON_TESTS="true"
# Compile assets
yarn build
# Check python formatting
source ./script/format check

@ -1 +1 @@
Subproject commit c44ca5070da78fd522a2e485aaa225cc638e11d3
Subproject commit c55d1eb5db0255784e46aec1006e4419465ef945