Browse Source

🔧 config

main
Louis Dutoit 5 years ago
parent
commit
9c1a3ba6fb
  1. 10
      .circleci/config.yml

10
.circleci/config.yml

@ -16,10 +16,12 @@ jobs:
- restore_cache: - restore_cache:
keys: keys:
- dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }} - dependencies-{{ checksum "requirements/dev.txt" }}-{{ checksum "requirements/prod.txt" }}
# Fallback to using the latest cache if no exact match is found
- dependencies-
- run: - run:
name: Install dependencies name: Install dependencies
command: pip install -r requirements/dev.txt command: pip install -r requirements/dev.txt
# Upgrade Dependencies
# Upgrade dependencies for sqlalchemy and Flask-SQLAlchemy to pass unit tests
- run: - run:
command: pip install sqlalchemy --upgrade && pip install Flask-SQLAlchemy --upgrade command: pip install sqlalchemy --upgrade && pip install Flask-SQLAlchemy --upgrade
- run: - run:
@ -34,7 +36,7 @@ jobs:
FLASK_APP: /home/circleci/repo/autoapp.py FLASK_APP: /home/circleci/repo/autoapp.py
FLASK_DEBUG: 0 FLASK_DEBUG: 0
command: flask test command: flask test
deploy-heroku:
back-deploy-heroku:
docker: docker:
- image: buildpack-deps:trusty - image: buildpack-deps:trusty
steps: steps:
@ -45,7 +47,7 @@ jobs:
- run: - run:
name: Smoke Test name: Smoke Test
command: | command: |
HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://devops-final-heroku.herokuapp.com/`
HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/`
if [[ "$HTTPCODE" -ne 200 ]]; then if [[ "$HTTPCODE" -ne 200 ]]; then
echo "heroku app not responding, failing deploy" \ echo "heroku app not responding, failing deploy" \
exit 1; \ exit 1; \
@ -73,7 +75,7 @@ workflows:
build-test: build-test:
jobs: jobs:
- install - install
- deploy-heroku:
- back-deploy-heroku:
requires: requires:
- install - install
- docker-build-and-push: - docker-build-and-push:

Loading…
Cancel
Save