-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwordpress.yaml
106 lines (105 loc) · 4.07 KB
/
wordpress.yaml
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
97
98
99
100
101
102
103
104
105
version: 2.1
description: |
Help to deploy wordpress projects
display:
home_url: https://github.com/donkeycode/circle-orbs
source_url: https://github.com/donkeycode/circle-orbs
orbs:
utils: donkeycode/[email protected]
executors:
default:
description: |
Php nginx executor
docker:
- image: donkeycode/php-nginx-symfony:<<parameters.image_tag>>
parameters:
image_tag:
default: 8.2-fpm
description: |
Pick a specific donkeycode/php-nginx-symfony image variant: https://hub.docker.com/r/donkeycode/php-nginx-symfony/tags
type: string
python:
description: |
Python
docker:
- image: python:3.9.19-alpine
jobs:
deploy:
description: |
Deploy wordpress project using fabfile
executor: python
parameters:
wordpress_folder:
default: apps/site
description: The wordpress base directory
type: string
steps:
- utils/install_git
- run:
command: apk add build-base libffi-dev openssh
- run:
command: pip install --upgrade pip && pip install fabric python-dotenv
- checkout
- restore_cache:
keys:
- v1-dependencies-<<parameters.wordpress_folder>>-{{ checksum "~/project/<<parameters.wordpress_folder>>/composer.lock" }}
- restore_cache:
keys:
- v2-wp-<<parameters.wordpress_folder>>-{{ checksum "~/project/<<parameters.wordpress_folder>>/composer.lock" }}
- run:
command: cd ~/project/<<parameters.wordpress_folder>> && fab deploy
prepare:
description: |
Prepare wordpress project
executor: default
parameters:
image_tag:
default: 8.2-fpm
description: |
Pick a specific donkeycode/php-nginx-symfony image variant: https://hub.docker.com/r/donkeycode/php-nginx-symfony/tags
type: string
wordpress_folder:
default: apps/site
description: The wordpress base directory
type: string
steps:
- utils/install_git
- run:
command: apk add openssh
- checkout
- restore_cache:
keys:
- v1-dependencies-<<parameters.wordpress_folder>>-{{ checksum "~/project/<<parameters.wordpress_folder>>/composer.lock" }}
- v1-dependencies-<<parameters.wordpress_folder>>-
- run:
command: composer self-update --2
name: Composer 2
working_directory: ~/project/<<parameters.wordpress_folder>>
- run:
command: composer install --ignore-platform-reqs --no-interaction
name: Install site deps
working_directory: ~/project/<<parameters.wordpress_folder>>
- save_cache:
key: v1-dependencies-<<parameters.wordpress_folder>>-{{ checksum "~/project/<<parameters.wordpress_folder>>/composer.lock" }}
paths:
- <<parameters.wordpress_folder>>/vendor
- save_cache:
key: v2-wp-<<parameters.wordpress_folder>>-{{ checksum "~/project/<<parameters.wordpress_folder>>/composer.lock" }}
paths:
- <<parameters.wordpress_folder>>/web/wp
- <<parameters.wordpress_folder>>/web/app
examples:
example:
description: |
Sample example description.
usage:
version: "2.1"
orbs:
wordpress: donkeycode/[email protected]
workflows:
use-my-orb:
jobs:
- wordpress/prepare:
image_tag: 8.2-fpm
name: Prepare Test
wordpress_folder: apps/wordpress