-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.drone.yml
More file actions
82 lines (75 loc) · 2.51 KB
/
.drone.yml
File metadata and controls
82 lines (75 loc) · 2.51 KB
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
pipeline:
Restore Composer cache:
image: plugins/s3-cache:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
restore: true
when:
branch:
include: [ development, feature/*, release/* ]
Install Composer dependencies:
image: imaximius/essentials:latest
commands:
- cd application
&& composer install -n --ignore-platform-reqs
when:
branch:
include: [ development, feature/*, release/* ]
Update Composer cache:
image: plugins/s3-cache:1
secrets: [ aws_access_key_id, aws_secret_access_key ]
rebuild: true
pull: true
mount:
- application/vendor
when:
event: push
branch:
include: [ development, feature/*, release/* ]
Flush Composer cache:
image: plugins/s3-cache:1
secrets: [ aws_access_key_id, aws_secret_access_key ]
pull: true
flush: true
flush_age: 14
when:
branch:
include: [ development, feature/*, release/* ]
Code checks:
image: imaximius/essentials:latest
commands:
- phpmd application/src text naming --exclude $id,$em,$qb
- phpmd application/src text design
- phpcs --standard=PSR2 application/src
- phpdcd application/src
- phpcpd application/src
- phpmd application/src text codesize
- deprecation-detector check application/src application/vendor/
- phpmd application/src text unusedcode
when:
branch:
include: [ development, feature/* ]
Build Feature image:
image: plugins/docker
context: application/
dockerfile: application/Dockerfile
secrets: [ docker_username, docker_password ]
repo: garlic/template
tags: ${DRONE_COMMIT_BRANCH##feature/}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
branch:
include: [ development, feature/* ]
Build Release image:
image: plugins/docker
context: application/
dockerfile: application/Dockerfile
secrets: [ docker_username, docker_password ]
repo: garlic/template
tags: ${DRONE_COMMIT_BRANCH##release/}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
branch:
include: [ release/* ]