Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
Renames prod compose file "ci-" -> "prod-"
Browse files Browse the repository at this point in the history
Consistent with the other web repos. Reorganizes the CircleCI
logic to be more explicit, in separate steps, to help unbreak the CI
testing on this branch.
  • Loading branch information
Conor Schaefer committed Jun 12, 2019
1 parent a0cddeb commit 579108f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
18 changes: 16 additions & 2 deletions .circleci/config.yml
Expand Up @@ -75,9 +75,23 @@ jobs:
- run:
name: Ensure we can run prod env
command: |
pipenv run make run-prod-env
pipenv run docker-compose -f prod-docker-compose.yaml up -d
while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do sleep 1 && echo -n .; done;
pipenv run make ci-go
- run:
name: Check for missing migrations
command: |
pipenv run docker-compose -f prod-docker-compose.yaml exec django /bin/bash -c "./manage.py makemigrations --dry-run --check"
- run:
name: Run app tests against prod containers
command: |
pipenv run docker-compose -f prod-docker-compose.yaml exec django /bin/bash -c "./manage.py test --noinput -k"
- run:
name: Run infra tests against prod containers
command: |
pipenv run pytest --junit-xml test-results/ops-tests.xml infratests
- run:
name: Ensure we can build and run dev env
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -67,11 +67,11 @@ bandit: ## Runs `bandit` static code analysis tool for security bugs

.PHONY: build-prod-container
build-prod-container: prod-concat-docker ## Builds prod environment
docker-compose -f ci-docker-compose.yaml build --no-cache
docker-compose -f prod-docker-compose.yaml build --no-cache

.PHONY: run-prod-env
run-prod-env: ## Runs prod-like env (run build-prod-container first)
docker-compose -f ci-docker-compose.yaml up -d
docker-compose -f prod-docker-compose.yaml up -d

.PHONY: prod-push
prod-push: ## Publishes prod container image to registry
Expand All @@ -93,7 +93,7 @@ app-tests-dev: ## Run development tests (dev)

.PHONY: app-tests-prod
app-tests-prod: ## Run development tests (prod)
docker-compose -f ci-docker-compose.yaml run django ./manage.py test --noinput --keepdb
docker-compose -f prod-docker-compose.yaml run django ./manage.py test --noinput --keepdb

.PHONY: npm-audit
npm-audit: ## Checks NodeJS NPM dependencies for vulnerabilities
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -83,7 +83,7 @@ The flow is this:
make build-prod-container

# Run the prod environment
docker-compose -f ci-docker-compose.yaml up
docker-compose -f prod-docker-compose.yaml up

# Run production apptests
make app-tests-prod
Expand All @@ -92,7 +92,7 @@ make app-tests-prod
make ops-tests

# Teardown prod
docker-compose -f ci-docker-compose.yaml down
docker-compose -f prod-docker-compose.yaml down
```


Expand Down
File renamed without changes.

0 comments on commit 579108f

Please sign in to comment.