forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
38 lines (36 loc) · 1.19 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
36
37
38
machine:
node:
version: "8.7.0"
python:
version: "3.6.2"
environment:
DATABASE_URL: postgres://ubuntu:@127.0.0.1:5432/circle_test
DJANGO_SETTINGS_MODULE: saleor.settings
SECRET_KEY: irrelevant
STATIC_URL: https://saleor-demo.s3.amazonaws.com/assets/
services:
- docker
dependencies:
pre:
- npm install
- npm run build-emails
- pip install -U pip
- 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:
tag: /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