-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
32 lines (32 loc) · 959 Bytes
/
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
general:
artifacts:
- ./coverage
machine:
node:
version: v6.2.2
services:
- docker
environment:
DB_NAME: circle_test
DB_USER: ubuntu
DB_HOST: localhost
test:
pre:
- npm install
post:
- npm run coverage
deployment:
hub:
branch: master
commands:
- docker build -t creativopty/adevav-back-end:latest ./
- docker tag creativopty/adevav-back-end:latest creativopty/adevav-back-end:$(date +'%Y%m%d')-$(git log -n 1 --pretty=format:"%h")
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push creativopty/adevav-back-end:latest
- docker push creativopty/adevav-back-end:$(date +'%Y%m%d')-$(git log -n 1 --pretty=format:"%h")
develop:
branch: develop
commands:
- docker build -t creativopty/adevav-back-end:develop ./
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push creativopty/adevav-back-end:develop