-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
41 lines (36 loc) · 995 Bytes
/
.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
---
kind: pipeline
type: docker
name: default
trigger:
event:
- push
- tag
- rollback
- promote
steps:
- name: ci
image: composer
commands:
- composer install --no-progress --no-suggest
# Listing individual commands from "composer ci", to have better control over the output and fail early
- composer validate --no-interaction
- composer lint-json
- composer lint-templates
- composer lint-wordlists
- composer test
- name: deploy
when:
branch: [ test, production ]
image: wikimediade/ansible-deploy
pull: never # Until we publish the image on docker hub
environment:
SSH_KEY:
from_secret: ssh_key
commands:
- echo "$SSH_KEY" > /ansible/.ssh/id_rsa && chmod 0600 /ansible/.ssh/id_rsa
- ansible-playbook -v -e prebuilt_source="$DRONE_WORKSPACE" -e deploy_target="$DRONE_BRANCH" /ansible/content.yml
volumes:
- name: cache
host:
path: /tmp/drone/cache