Skip to content

Commit

Permalink
Merge #204
Browse files Browse the repository at this point in the history
204: Switch to S3 + ECR. r=mithrandi a=mithrandi





Co-authored-by: Tristan Seligmann <[email protected]>
  • Loading branch information
bors-fusion[bot] and mithrandi committed Jul 2, 2018
2 parents a78a76b + 5233899 commit 643e25b
Showing 1 changed file with 79 additions and 26 deletions.
105 changes: 79 additions & 26 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
pipeline:
restore_cache:
image: appleboy/drone-sftp-cache
server: sftp-cache.drone7.non-production.fusionapp.com
port: 45945
username: drone-cache
path: /drone-cache
image: plugins/s3-cache
pull: true
endpoint: https://s3.amazonaws.com
root: /drone-cache-fusionapp-useast
restore: true
ignore_branch: true
mount:
- /drone/pip-cache
- /drone/pex-cache
secrets:
- sftp_cache_password
- aws_access_key_id
- aws_secret_access_key
when:
event:
- push
- pull_request
- tag
build:
image: fusionapp/base
pull: true
Expand All @@ -32,48 +36,86 @@ pipeline:
--requirement requirements.txt
.
- env PEX_MODULE=twisted.trial ./fusion-index.pex fusion_index
when:
event:
- push
- pull_request
- tag
rebuild_cache:
image: appleboy/drone-sftp-cache
server: sftp-cache.drone7.non-production.fusionapp.com
port: 45945
username: drone-cache
path: /drone-cache
image: plugins/s3-cache
pull: true
endpoint: https://s3.amazonaws.com
root: /drone-cache-fusionapp-useast
rebuild: true
ignore_branch: true
mount:
- /drone/pip-cache
- /drone/pex-cache
secrets:
- aws_access_key_id
- aws_secret_access_key
when:
event: push
branch: master
branch:
- master
flush_cache:
image: plugins/s3-cache
pull: true
endpoint: https://s3.amazonaws.com
root: /drone-cache-fusionapp-useast
flush: true
secrets:
- sftp_cache_password
- aws_access_key_id
- aws_secret_access_key
when:
event: push
branch:
- master
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
image: plugins/ecr
region: eu-west-1
registry: 801493518741.dkr.ecr.eu-west-1.amazonaws.com
repo: 801493518741.dkr.ecr.eu-west-1.amazonaws.com/fusion-index
tags:
- ${DRONE_BRANCH}
- git-${DRONE_COMMIT_SHA}
when:
event: push
branch: master
secrets:
- docker_password
- ecr_access_key
- ecr_secret_key
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}
docker_image: 801493518741.dkr.ecr.eu-west-1.amazonaws.com/fusion-index:git-${DRONE_COMMIT_SHA}
start_first: false
confirm: true
timeout: 120
timeout: 240
when:
event: push
branch: master
secrets:
- rancher_access_key
- rancher_secret_key
- 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/fusion-index
docker_image: 801493518741.dkr.ecr.eu-west-1.amazonaws.com/fusion-index:git-${DRONE_COMMIT_SHA}
start_first: false
confirm: true
timeout: 240
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:
Expand All @@ -82,6 +124,17 @@ pipeline:
status:
- success
- failure
slack_production:
image: plugins/slack
secrets:
- slack_webhook
channel: production
when:
event: deployment
environment: production
status:
- success
- failure
branches:
- master
- staging
Expand Down

0 comments on commit 643e25b

Please sign in to comment.