-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy path.drone.yml
87 lines (78 loc) · 2.26 KB
/
.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
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
clone:
default:
image: plugins/git
recursive: true
group: clone
submodule_update_remote: true
submodule_override:
docs-theme: https://github.com/PressLabs/docs-theme.git
presslabs-org:
image: alpine/git
group: clone
commands:
# write the ssh key to disk
- mkdir /root/.ssh
- echo -n "$GIT_PUSH_SSH_KEY" > /root/.ssh/id_rsa
- chmod 600 /root/.ssh/id_rsa
# add github to known hosts
- touch /root/.ssh/known_hosts
- chmod 600 /root/.ssh/known_hosts
- ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts 2> /dev/null
# clone presslabs-org
- git clone -b prod [email protected]:/PressLabs/presslabs-org.git /drone/src/presslabs-org
secrets:
- GIT_PUSH_SSH_KEY
pipeline:
test-gitium:
image: presslabs/pl-test-containers:php-${PHP_VERSION}
pull: true
group: build
commands:
- bash bin/install-wp-tests.sh wordpress_test root root_pass database ${WP_VERSION} true
- composer install --no-progress
- dockerize --wait tcp://database:3306 -timeout 10s
- make test
environment:
- WP_TESTS_DIR=/tmp/wordpress-tests-lib-${WP_VERSION}/
- WP_CORE_DIR=/tmp/wordpress-${WP_VERSION}/
build-docs:
image: jobandtalent/mkdocs
group: build
commands:
- cd docs/
- pip3 install mdx_figcaption_ng
- mkdocs build --clean
- for i in $(ls | grep -v compiled_docs); do rm -rf $i; done
- mkdir -p /drone/src/presslabs-org/wp-content/root/gitium/docs
- rm -rf /drone/src/presslabs-org/wp-content/root/gitium/docs/*
- mv compiled_docs/* /drone/src/presslabs-org/wp-content/root/gitium/docs
- rm -rf compiled_docs/
when:
branch: master
update-presslabs-org:
image: appleboy/drone-git-push
branch: prod
group: docs
commit: true
path: /drone/src/presslabs-org
commit_message: "[docs] Update gitium docs"
remote: [email protected]:/Presslabs/presslabs-org.git
secrets:
- GIT_PUSH_SSH_KEY
when:
branch: master
services:
database:
image: mysql
environment:
- MYSQL_DATABASE=wordpress_test
- MYSQL_ROOT_PASSWORD=root_pass
workspace:
base: /drone
path: src/gitium
matrix:
WP_VERSION:
- 4.9.7
PHP_VERSION:
- 7.1
- 7.2