forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
72 lines (65 loc) · 2.49 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
67
68
69
70
71
72
# This file is used by the Drone CI Server and Agents to determine what
# should happen (if anything) in response to git pushes and pull requests.
clone:
depth: 50
recursive: false
tags: false
# This is explicitly set so that forks retain a constant path.
path: /drone/src/github.com/reddit/reddit-public
compose:
# Some of these aren't actively used, but are required in that import
# side-effects cause connections to services (regardless of whether
# the services are interacted with in the tests). Each service is addressable
# via 'localhost' through whatever ports the image exposes.
postgres:
# Temporarily needed for this image + Docker-in-Docker. Expected to
# be removed when we upgrade to Drone 0.5.
# https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
privileged: true
image: postgres:9.3.12
environment:
POSTGRES_USER: reddit
POSTGRES_PASSWORD: password
POSTGRES_DB: reddit
cassandra:
privileged: true
# Cassandra 1.x is old enough not to have any official Docker images.
# In the meantime, we've got a custom image configured specifically for r2:
# https://github.com/reddit/docker-cassandra
# We'll move over to the official images when we upgrade to C* 2.x.
image: reddit/cassandra:single-1.2.19-v1
rabbitmq:
# NOTE: Using 3.4.x instead of 3.2.4 due to tag availability.
image: rabbitmq:3.4
environment:
RABBITMQ_DEFAULT_VHOST: /
RABBITMQ_DEFAULT_USER: reddit
RABBITMQ_DEFAULT_PASS: reddit
memcached:
# NOTE: Using 1.4.21 instead of 1.4.17 due to tag availability.
image: memcached:1.4.21
zookeeper:
image: jplock/zookeeper:3.4.6
# Build steps are where the setup, compilation, and tests happen.
build:
# This is a fat Docker image with the apt dependencies pre-installed.
# https://github.com/reddit/docker-reddit-py
# Dependency changes in the install scripts can be optionally mirrored to the
# image for speedups, but abstaining from doing so won't break the builds.
image: reddit/reddit-py:latest
# Always re-pull the image, since we're re-using the same tag.
pull: true
environment:
DEBIAN_FRONTEND: noninteractive
commands:
# Prepares the environment for the test run.
- install/drone.sh
- cd r2
- nosetests -v .
- cd ..
- ./scripts/stylecheck_git_diff.sh
# These plugins are triggered after a build failure/success.
notify:
slack:
webhook_url: $$CI_SLACK_WEBHOOK_URL
channel: ci-notifications