From aa27a42eac0939c29521d5ecb78880c4093e173d Mon Sep 17 00:00:00 2001 From: Jack Pordi Date: Thu, 9 Aug 2018 19:47:32 +0100 Subject: [PATCH] Circle2 --- .circleci/config.yml | 51 ++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 3 ++- setup.sh | 6 ++++++ test.sh | 0 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .circleci/config.yml create mode 100755 setup.sh mode change 100644 => 100755 test.sh diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..852bb33 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,51 @@ +version: 2 +jobs: + setup: + docker: + - image: circleci/python:3.5.6-jessie-node-browsers + steps: + - checkout + - run: ./setup.sh + - persist_to_workspace: + root: /home/circleci/ + paths: + - project + + test: + docker: + - image: circleci/python:3.5.6-jessie-node-browsers + steps: + - attach_workspace: + at: /home/circleci + - run: source venv/bin/activate && ./test.sh + deploy: + docker: + - image: circleci/python:3.5.6-jessie-node-browsers + steps: + - attach_workspace: + at: /home/circleci + - run: source venv/bin/activate && eb deploy --profile default +workflows: + version: 2 + master: + jobs: + - setup: + filters: + branches: + only: master + - test: + requires: + - setup + - deploy: + requires: + - test + + feature_branch: + jobs: + - setup + - test: + requires: + - setup + filters: + branches: + ignore: master diff --git a/requirements.txt b/requirements.txt index 3a15087..dd48f86 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Django==1.11.2 django-bootstrap3==8.2.3 -pytz==2017.2 \ No newline at end of file +pytz==2017.2 +awsebcli==3.7.4 diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..af032e5 --- /dev/null +++ b/setup.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +virtualenv -p python3 venv +venv/bin/pip install -r requirements.txt +cp sampleconfig.py config.py +cp sampledb.sqlite3 db.sqlite3 diff --git a/test.sh b/test.sh old mode 100644 new mode 100755