-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
executable file
·66 lines (60 loc) · 1.76 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
66
---
pipeline:
mongo-setup:
image: mongo:3.4.10
commands:
- sleep 15
- 'mongo --host mongo --eval "db.getSiblingDB(''test'').createUser({user:''test'', pwd:''test'', roles:[{role:''dbOwner'', db:''test''}]});"'
test:
image: python:${PYTHON_VERSION}
environment:
- HIKAYATABLES_MONGODB_HOST=mongo
- CELERY_BROKER_URL=redis://redis@redis:6379/0
secrets: [SECRET_PASS]
commands:
- pip install -r requirements/ci.txt
- flake8 */tests/ */forms.py hikaya/ --exclude=settings,migrations,models.py,hikaya/__init__.py
- python manage.py test
when:
event: [pull_request, push, tag]
build-docker-image-tag:
image: plugins/docker
insecure: true
registry: registry.hikaya.io
repo: registry.hikaya.io/hikaya/tables
file: Dockerfile
auto_tag: true
secrets: [DOCKER_USERNAME, DOCKER_PASSWORD]
when:
event: [tag]
status: [success]
trigger-dev-deployment:
image: quay.io/ukhomeofficedigital/drone-trigger:latest
verbose: true
drone_server: http://drone.humanitec.io
drone_token: $DRONE_TOKEN
secrets: [DRONE_TOKEN]
repo: Humanitec/deployment
branch: master
deploy_to: marathon
params: "APP_ID=/tables,APP_GROUP=hikayadata,APP_NAME=Tables,APP_BRANCH=dev-v2,APP_COMMIT=${DRONE_COMMIT_SHA},APP_TAG=${DRONE_TAG},APP_IMAGE=registry.hikaya.io/hikayadata/tables:${DRONE_TAG##v}"
when:
event: [tag]
status: [success]
notify:
image: plugins/slack
channel: drone-ci
username: Drone-CI
secrets: [SLACK_WEBHOOK]
when:
status: [failure]
event: [push, tag]
branch: [master, demo, staging, dev-v2]
services:
mongo:
image: mongo:3.4.10
redis:
image: redis:4.0
matrix:
PYTHON_VERSION:
- 2.7