-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
88 lines (88 loc) · 2.08 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
pipeline:
restore_cache:
image: appleboy/drone-sftp-cache
server: sftp-cache.drone7.non-production.fusionapp.com
port: 45945
username: drone-cache
path: /drone-cache
restore: true
ignore_branch: true
mount:
- /drone/pip-cache
- /drone/pex-cache
secrets:
- sftp_cache_password
build:
image: fusionapp/base
pull: true
environment:
- PIP_CACHE_DIR=/drone/pip-cache
commands:
# Take this out once pex is in the base image
- /appenv/bin/pip install pex==1.4.1 requests==2.18.4
- >
/appenv/bin/pex
--python /appenv/bin/python
--no-pypi
--index https://pypi.org/simple/
--cache-dir /drone/pex-cache
--script twistd
--output-file fusion-index.pex
--always-write-cache
--requirement requirements.txt
.
- env PEX_MODULE=twisted.trial ./fusion-index.pex fusion_index
rebuild_cache:
image: appleboy/drone-sftp-cache
server: sftp-cache.drone7.non-production.fusionapp.com
port: 45945
username: drone-cache
path: /drone-cache
rebuild: true
ignore_branch: true
mount:
- /drone/pip-cache
- /drone/pex-cache
when:
event: push
branch: master
secrets:
- sftp_cache_password
publish:
image: plugins/docker
repo: eu.gcr.io/fusion-168903/fusion-index
tags: ${DRONE_BRANCH}
registry: eu.gcr.io
mirror: https://eu-mirror.gcr.io
username: _json_key
when:
event: push
branch: master
secrets:
- docker_password
deploy:
image: peloton/drone-rancher
url: https://rancher.fusionapp.com
service: Fusion/fusion-index
docker_image: eu.gcr.io/fusion-168903/fusion-index:${DRONE_BRANCH}
start_first: false
confirm: true
timeout: 120
when:
event: push
branch: master
secrets:
- rancher_access_key
- rancher_secret_key
slack:
image: plugins/slack
secrets:
- slack_webhook
when:
status:
- success
- failure
branches:
- master
- staging
- trying