This repository has been archived by the owner on Jun 15, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yml
51 lines (50 loc) · 1.52 KB
/
config.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
# See: https://github.com/TypistTech/tiller-circleci
---
version: 2
jobs:
deploy-production:
docker:
- image: itinerisltd/tiller:latest
environment:
ANSIBLE_HOST_KEY_CHECKING: false
# TODO: Customize these environment variables
SITE_ENV: production
SITE_KEY: example.com
steps:
- checkout
- restore_cache:
key: v1-ansible-galaxy-{{ checksum "trellis/galaxy.yml" }}
- restore_cache:
keys:
- v1-production-{{ .Branch }}-{{ .Revision }}-
- v1-production-{{ .Branch }}-
- v1-production-
- run:
name: Set Ansible Vault Pass
command: echo $VAULT_PASS > .vault_pass
working_directory: trellis
- run:
name: Install Ansible Galaxy Roles
command: ansible-galaxy install -r galaxy.yml -vvvv
working_directory: trellis
- deploy:
command: ansible-playbook deploy.yml -e env=$SITE_ENV -e site=$SITE_KEY -e site_version=$CIRCLE_SHA1 -vvvv
working_directory: trellis
- save_cache:
key: v1-ansible-galaxy-{{ checksum "trellis/galaxy.yml" }}
paths:
- trellis/vendor
- save_cache:
key: v1-production-{{ .Branch }}-{{ .Revision }}-{{ epoch }}
paths:
- /tmp/trellis
- /usr/local/share/.cache/yarn/v1
# TODO: Customize the workflow
workflows:
version: 2
tiller:
jobs:
- deploy-production:
filters:
branches:
only: master