forked from ec-europa/toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
executable file
·151 lines (136 loc) · 5.45 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
# ==============================================================================
# Workspace location.
# ==============================================================================
workspace:
base: /test
path: toolkit
# ==============================================================================
# Matrix section
# ==============================================================================
matrix:
PHING_OPTS:
- -logger phing.listener.AnsiColorLogger
BUILD_OPTIONS:
- -D'platform.package.version'='2.3' -D'profile'='multisite_drupal_standard'
- -D'platform.package.version'='2.4' -D'profile'='multisite_drupal_standard'
- -D'platform.package.version'='2.5' -D'profile'='multisite_drupal_standard'
- -D'profile'='drupal' -D'profile.name'='minimal' -D'profile.core'='7.x'
- -D'profile'='drupal' -D'profile.name'='standard' -D'profile.core'='8.7.x'
# ==============================================================================
# Main services
# ==============================================================================
services:
web:
image: fpfis/php56-build
environment:
- DOCUMENT_ROOT=/test/toolkit/build
mysql:
image: percona/percona-server:5.6
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
visreg:
image: backstopjs/backstopjs
entrypoint: [ "/bin/bash" ]
# ==============================================================================
# Pipelines
# ==============================================================================
pipeline:
# ============================================================================
# Setup section:
# ============================================================================
setup:
image: fpfis/php56-dev
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/php56-dev
group: build
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:
# ============================================================================
visreg-init:
image: backstopjs/backstopjs
commands:
- backstop init
install-clean:
image: fpfis/php56-dev
commands:
- ./toolkit/phing install-clean ${BUILD_OPTIONS} ${PHING_OPTS}
- ./toolkit/phing docker-backstop-generate ${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
visreg-before:
image: backstopjs/backstopjs
commands:
- cp -f includes/docker/docker-backstopjs/core/util/runPuppet.js /usr/local/lib/node_modules/backstopjs/core/util/runPuppet.js
- cp -f includes/docker/docker-backstopjs/core/util/compare/index.js /usr/local/lib/node_modules/backstopjs/core/util/compare/index.js
- backstop reference
# ============================================================================
# Clone section:
# ============================================================================
install-clone:
image: fpfis/php56-dev
commands:
- ./toolkit/phing install-clone -D'project.db.file'='/test/toolkit/dump.sql' ${BUILD_OPTIONS} ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache
visreg-after:
image: backstopjs/backstopjs
commands:
- cp -f includes/docker/docker-backstopjs/core/util/runPuppet.js /usr/local/lib/node_modules/backstopjs/core/util/runPuppet.js
- cp -f includes/docker/docker-backstopjs/core/util/compare/index.js /usr/local/lib/node_modules/backstopjs/core/util/compare/index.js
- backstop test || echo 'Proceed ...'
smoketest:
image: fpfis/php56-dev
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/php56-dev
commands:
- ./toolkit/phing test-run-behat ${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}}