-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
54 lines (52 loc) · 1.79 KB
/
.drone.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
pipeline:
test:
image: java:8
commands:
- java -version
- ./gradlew verifyGoogleJavaFormat
- export DB_HOST=$(/sbin/ip route | awk '/default/ { print $3 }')
- export DB_PORT=3307
- export DB_ROOT_PASSWORD=onkibot_test
- export DB_NAME=onkibot_test
- export DB_USERNAME=onkibot_test
- export DB_PASSWORD=onkibot_test
- ./gradlew test
- ./gradlew jacocoTestReport
- ./gradlew javadoc
- curl -s https://codecov.io/bash | bash -s - -t $CODECOV_TOKEN
when:
event: push
branch:
exclude: [ master, development ]
development:
image: docker/compose:1.8.1
commands:
- echo "DB_HOST=$(/sbin/ip route | awk '/default/ { print $3 }')" > .env
- echo "DB_PORT=3307" >> .env
- echo "DB_ROOT_PASSWORD=onkibot" >> .env
- echo "DB_NAME=onkibot" >> .env
- echo "DB_USERNAME=onkibot" >> .env
- echo "DB_PASSWORD=onkibot" >> .env
- docker-compose -f docker-compose.dev.yml build web
- docker-compose -f docker-compose.dev.yml -p onkibot-backend-dev up -d web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
branch: development
event: push
production:
image: docker/compose:1.8.1
commands:
- echo "DB_HOST=$(/sbin/ip route | awk '/default/ { print $3 }')" > .env
- echo "DB_PORT=3306" >> .env
- echo "DB_ROOT_PASSWORD=onkibot" >> .env
- echo "DB_NAME=onkibot" >> .env
- echo "DB_USERNAME=onkibot" >> .env
- echo "DB_PASSWORD=onkibot" >> .env
- docker-compose -f docker-compose.prod.yml build web
- docker-compose -f docker-compose.prod.yml -p onkibot-backend-prod up -d web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
branch: refs/tags/*
event: tag