This repository has been archived by the owner on Aug 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
96 lines (96 loc) · 2.33 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
89
90
91
92
93
94
95
96
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
secrets:
- sftp_cache_password
build:
image: fusionapp/base
pull: true
environment:
- PIP_DISABLE_PIP_VERSION_CHECK=1
- PIP_CACHE_DIR=/drone/pip-cache
commands:
- mkdir -p $PIP_CACHE_DIR
- /appenv/bin/pip install --requirement requirements.txt .
- /appenv/bin/trial documint
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
when:
event: push
branch: master
secrets:
- sftp_cache_password
publish:
image: plugins/docker
repo: eu.gcr.io/fusion-168903/documint
tags:
- ${DRONE_BRANCH}
- git-${DRONE_COMMIT_SHA}
registry: eu.gcr.io
mirror: https://eu-mirror.gcr.io
username: _json_key
when:
event: push
branch: master
secrets:
- docker_password
deploy-uat:
image: peloton/drone-rancher
url: https://rancher.fusionapp.com
service: Fusion/documint
docker_image: eu.gcr.io/fusion-168903/documint:git-${DRONE_COMMIT_SHA}
start_first: false
confirm: true
timeout: 120
when:
event: push
branch: master
secrets:
- source: rancher_nonprod_access_key
target: rancher_access_key
- source: rancher_nonprod_secret_key
target: rancher_secret_key
deploy-production:
image: peloton/drone-rancher
url: https://rancher.fusionapp.com
service: fusion/documint
docker_image: eu.gcr.io/fusion-168903/documint:git-${DRONE_COMMIT_SHA}
start_first: false
confirm: true
timeout: 120
when:
event: deployment
environment: production
secrets:
- source: rancher_prod_access_key
target: rancher_access_key
- source: rancher_prod_secret_key
target: rancher_secret_key
slack:
image: plugins/slack
secrets:
- slack_webhook
when:
status:
- success
- failure
branches:
- master
- staging
- trying