-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
65 lines (59 loc) · 1.65 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
55
56
57
58
59
60
61
62
63
64
65
---
pipeline:
mongo-setup:
image: mongo:3.0
commands:
- sleep 15
- 'mongo --host mongo --eval "db.getSiblingDB(''test'').createUser({user:''test'', pwd:''test'', roles:[{role:''dbOwner'', db:''test''}]});"'
build:
image: python:${PYTHON_VERSION}
environment:
- TOLATABLES_MONGODB_HOST=mongo
secrets: [SECRET_PASS]
commands:
- pip install -r requirements-ci.txt
- python manage.py test
when:
event: [push, tag]
build-docker-image:
image: plugins/docker
insecure: true
registry: registry.tola.io
repo: registry.tola.io/toladata/tolatables
file: Dockerfile
tags:
- ${DRONE_COMMIT_SHA}
secrets: [DOCKER_USERNAME, DOCKER_PASSWORD]
when:
event: [push, tag]
branches: [master, dev-v2]
status: [success]
trigger-deployment:
image: quay.io/ukhomeofficedigital/drone-trigger:latest
verbose: true
drone_server: http://drone.tola.io
drone_token: $DRONE_TOKEN
secrets: [DRONE_TOKEN]
repo: toladata/deployment
branch: master
deploy_to: marathon
params: "APP_ID=/tolatables,APP_GROUP=toladata,APP_NAME=TolaTables,APP_BRANCH=${DRONE_COMMIT_BRANCH},APP_COMMIT=${DRONE_COMMIT_SHA},APP_TAG=${DRONE_TAG},APP_IMAGE=registry.tola.io/toladata/tolatables:${DRONE_COMMIT_SHA}"
when:
event: [push, tag]
branches: [master, dev-v2]
status: [success]
notify:
image: plugins/slack
channel: drone-ci
username: Drone-CI
secrets: [SLACK_WEBHOOK]
when:
status: [failure]
event: [push, tag]
branches: [master, dev-v2]
services:
mongo:
image: mongo:3.4.10
matrix:
PYTHON_VERSION:
- 2.7