-
Notifications
You must be signed in to change notification settings - Fork 36
/
.lando.yml
114 lines (108 loc) · 4.13 KB
/
.lando.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
name: drupal-contributions
recipe: drupal9
config:
webroot: web
xdebug: 'debug'
services:
appserver:
build_as_root:
# Note that you will want to use the script for the major version of node you want to install
# See: https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions
- curl -sL https://deb.nodesource.com/setup_16.x | bash -
- apt-get install -y nodejs
- npm install --global yarn
- rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload
run:
- cd /app/web && composer require drush/drush palantirnet/drupal-rector && composer install
- mkdir -p private/browsertest_output
- yarn install --non-interactive --cwd /app/web/core
overrides:
environment:
SIMPLETEST_BASE_URL: "https://drupal-contributions.lndo.site/"
SIMPLETEST_DB: "sqlite://localhost/tmp/db.sqlite"
BROWSERTEST_OUTPUT_DIRECTORY: '/app/web/sites/simpletest/browser_output'
BROWSERTEST_OUTPUT_BASE_URL: 'https://drupal-contributions.lndo.site'
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox"]}}, "http://chrome:9515"]'
# Nightwatch
DRUPAL_TEST_BASE_URL: 'http://appserver'
DRUPAL_TEST_DB_URL: 'mysql://drupal9:drupal9@database:3306/drupal9'
DRUPAL_TEST_WEBDRIVER_HOSTNAME: chrome
DRUPAL_TEST_WEBDRIVER_PORT: 9515
DRUPAL_TEST_CHROMEDRIVER_AUTOSTART: 'false'
DRUPAL_TEST_WEBDRIVER_CHROME_ARGS: "--disable-gpu --headless --no-sandbox"
DRUPAL_NIGHTWATCH_OUTPUT: reports/nightwatch
DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES: node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest
chrome:
type: compose
app_mount: false
services:
image: drupalci/webdriver-chromedriver:production
command: chromedriver --log-path=/tmp/chromedriver.log --allowed-origins=* --verbose --whitelisted-ips=
tooling:
drush:
service: appserver
cmd:
web/vendor/drush/drush/drush --root=/app/web --uri=https://drupal-contributions.lndo.site
rector:
service: appserver
cmd: web/vendor/bin/rector
si:
service: appserver
description: Install Drupal
cmd:
- appserver: /app/scripts/site-install.sh
patch:
service: appserver
description: Get a patch from a Drupal project issue queue
cmd:
- appserver: php /app/scripts/patch-helpers.php
options:
url:
describe: The url of the patch from the issue queue
revert:
service: appserver
description: Apply a patch from a Drupal project issue queue
cmd:
- appserver: php /app/scripts/patch-helpers.php --revert
patch:
describe: The name of the patch to revert; i.e. DESCRIPTION-XXXXXXX-YY.patch
create-patch:
service: appserver
description: Creat a patch from your committed changes on your branch.
cmd:
- appserver: php /app/scripts/patch-helpers.php --create-patch
phpunit:
service: appserver
user: www-data
cmd:
- appserver: php /app/web/vendor/bin/phpunit -c /app/phpunit.xml
core-check:
service: appserver
cmd:
- appserver: php /app/scripts/core-check.php
nightwatch:
service: appserver
description: Run Nightwatch.js
cmd: yarn test:nightwatch
dir: /app/web/core
xdebug-on:
service: appserver
description: Enable xdebug for Apache.
cmd: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && docker-php-ext-enable xdebug && /etc/init.d/apache2 reload && echo "Xdebug enabled"
user: root
xdebug-off:
service: appserver
description: Disable xdebug for Apache.
cmd: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload && echo "Xdebug disabled"
user: root
events:
post-start:
- if [ ! -d web ] ; then php /app/scripts/get-drupal.php ; fi
post-destroy:
- chmod 777 -R web/sites/default
- echo "Removing web/" && rm -rf /app/web
pre-rebuild:
- echo "Removing web/" && rm -rf web
- appserver: php /app/scripts/get-drupal.php
post-rebuild:
- appserver: /app/scripts/rebuild.sh