forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
35 lines (33 loc) · 1.08 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
machine:
node:
version: "8.7.0"
python:
version: "3.5.1"
environment:
DATABASE_URL: postgres://ubuntu:@127.0.0.1:5432/circle_test
DJANGO_SETTINGS_MODULE: saleor.settings
SECRET_KEY: irrelevant
services:
- docker
dependencies:
pre:
- npm install
- pip install -r requirements.txt
override:
- npm run build-assets --production
- ./manage.py collectstatic --no-input
- sed -i.bak "s#'dev'#'$(git describe --tags)'#" saleor/__init__.py
post:
- docker build --rm=false -t mirumee/saleor:latest .
test:
override:
- docker run --net=host -e DATABASE_URL -e DJANGO_SETTINGS_MODULE -e SECRET_KEY mirumee/saleor:latest pytest
deployment:
release:
branch: demo
commands:
- docker login -e $DOCKERCLOUD_EMAIL -u $DOCKERCLOUD_USER -p $DOCKERCLOUD_PASS
- docker tag mirumee/saleor:latest mirumee/saleor:$CIRCLE_SHA1
- docker push mirumee/saleor:$CIRCLE_SHA1
- docker push mirumee/saleor:latest
- curl -X POST https://circleci.com/api/v1.1/project/github/mirumee/saleor-demo?circle-token=$CIRCLE_API_TOKEN