forked from ec-europa/toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
executable file
·174 lines (157 loc) · 6.39 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# ==============================================================================
# Pull request clone ===========================================================
# ==============================================================================
# Use plugin to checkout pull requests for caching issue:
# https://github.com/drone/drone/issues/2390
# ==============================================================================
clone:
git:
image: plugins/git:next
# ==============================================================================
# Workspace location.
# ==============================================================================
workspace:
base: /test
path: toolkit
# ==============================================================================
# Matrix section
# ==============================================================================
matrix:
include:
- PHP_VERSION: 5.6
PHING_OPTS: -logger phing.listener.AnsiColorLogger
BUILD_OPTIONS: -D'platform.package.version'='2.5' -D'profile'='multisite_drupal_standard'
- PHP_VERSION: 7.3
PHING_OPTS: -logger phing.listener.AnsiColorLogger
BUILD_OPTIONS: -D'platform.package.version'='2.6' -D'profile'='multisite_drupal_standard'
- PHP_VERSION: 7.3
PHING_OPTS: -logger phing.listener.AnsiColorLogger
BUILD_OPTIONS: -D'profile'='drupal' -D'profile.name'='minimal' -D'profile.core'='7.x'
# ==============================================================================
# Main services
# ==============================================================================
services:
web:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
environment:
- DOCUMENT_ROOT=/test/toolkit/build
mysql:
image: percona/percona-server:5.6
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
# ==============================================================================
# Pipelines
# ==============================================================================
pipeline:
# ============================================================================
# Setup section:
# ============================================================================
setup:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
group: setup
commands:
- PROJECT=$(pwd) composer toolkit-install
- rm -rf ./.tmp/ ./build
- cp ./includes/phing/props/drone.props build.develop.props
- ./toolkit/phing project-properties-validate ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
# ============================================================================
# Build section:
# ============================================================================
build:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
group: build
secrets: [ github_api_token ]
commands:
- ./toolkit/phing build-platform build-subsite-dev ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
solr:
image: fpfis/solr5
group: build
detach: true
# ============================================================================
# Install section:
# ============================================================================
install-clean:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
commands:
- ./toolkit/phing install-clean ${BUILD_OPTIONS} ${PHING_OPTS}
- ./toolkit/phing drush-gdpr-dump -D'database-file'='/test/toolkit/dump.sql' ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
# ============================================================================
# Clone section:
# ============================================================================
install-clone:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
commands:
- ./toolkit/phing install-clone -D'project.db.file'='/test/toolkit/dump.sql.gz' ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
smoketest:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
commands:
- ./toolkit/phing drush-run-smoketest ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
selenium:
image: selenium/standalone-chrome
group: prebehat
detach: true
# ============================================================================
# Test section:
# ============================================================================
behat:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
group: coding-standards
commands:
- ./toolkit/phing test-run-behat ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
phpcs:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
group: coding-standards
commands:
- ./toolkit/phing test-run-phpcs ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
php7-comp:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
group: coding-standards
commands:
- ./toolkit/phing test-run-phpcs-compatibility -D'phpcs.compat.checkreturn'='false' ${BUILD_OPTIONS} ${PHING_OPTS}
create-distribution:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
group: deploy
commands:
- ./toolkit/phing create-distribution ${BUILD_OPTIONS} ${PHING_OPTS}
# ============================================================================
# Git hook integration section:
# ============================================================================
git-hooks:
image: fpfis/httpd-php-dev:${PHP_VERSION=5.6}
commands:
- ./toolkit/phing git-hook-enable ${BUILD_OPTIONS} ${PHING_OPTS}
- ./toolkit/phing git-hook-disable ${BUILD_OPTIONS} ${PHING_OPTS}
- ./toolkit/phing git-hook-enable ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
# ============================================================================
# Notify section:
# ============================================================================
# slack:
# image: plugins/slack
# channel: ci
# username: Subsite-QA
# icon_url: https://www.drupal.org/files/examples_meatwad256.png
# secrets: [ slack_webhook ]
# when:
# status: [ success, failure ]
# template: >
# {{#success build.status}}
# {{repo.name}}@{{build.branch}} <{{build.link}}|passed> all subsite tests.
# {{else}}
# {{repo.name}}@{{build.branch}} <{{build.link}}|failed> subsite tests.
# {{/success}}