Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENEUROPA-582: Port CI to Drone. #18

Merged
merged 6 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,42 @@ workspace:

services:
web:
image: fpfis/php71-build:latest
image: fpfis/httpd-php-dev:7.1
environment:
- DOCUMENT_ROOT=/test/oe_multilingual
- DOCUMENT_ROOT=/test/oe_multilingual
mysql:
image: percona/percona-server:5.6
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
frpc-tunnel:
image: fpfis/drone-frpc-plugin:latest
when:
event: [ push, tag ]
secrets: [ frpc_token, frpc_server ]
environment:
- PLUGIN_ENDPOINT=web:8080
- PLUGIN_GEN_AUTH=yes
- PLUGIN_DOMAIN=oe_multilingual-${DRONE_BUILD_NUMBER}-${DRONE_JOB_NUMBER}.ci.fpfis.tech.ec.europa.eu
- PLUGIN_URL_OUTPUT_FILE=/test/oe_multilingual/.frpc

matrix:
DRUPAL_VERSION:
- 8.6.x

pipeline:

composer-install:
image: fpfis/php71-build
group: prepare
image: fpfis/httpd-php-dev:7.1
volumes:
- /cache:/cache
commands:
- composer require --dev webflo/drupal-core-require-dev:${DRUPAL_VERSION=8.6.x}
- composer install

site-install:
image: fpfis/php71-build
image: fpfis/httpd-php-dev:7.1
commands:
- ./vendor/bin/run drupal:site-install

grumphp:
group: test
image: fpfis/php71-build
image: fpfis/httpd-php-dev:7.1
commands:
- ./vendor/bin/grumphp run

phpunit:
group: test
image: fpfis/php71-build
image: fpfis/httpd-php-dev:7.1
commands:
- ./vendor/bin/phpunit

behat:
group: test
image: fpfis/php71-build
image: fpfis/httpd-php-dev:7.1
commands:
- ./vendor/bin/behat
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ $ docker-compose up -d
Then:

```
$ docker-compose exec -u web web composer install
$ docker-compose exec -u web web ./vendor/bin/run drupal:site-install
$ docker-compose exec web composer install
$ docker-compose exec web ./vendor/bin/run drupal:site-install
```

Your test site will be available at [http://localhost:8080/build](http://localhost:8080/build).

Run tests as follows:

```
$ docker-compose exec -u web web ./vendor/bin/phpunit
$ docker-compose exec -u web web ./vendor/bin/behat
$ docker-compose exec web ./vendor/bin/phpunit
$ docker-compose exec web ./vendor/bin/behat
```

### Disable Drupal 8 caching
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"composer-exit-on-patch-failure": true,
"patches": {
"drupal/core": {
"https://www.drupal.org/project/drupal/issues/2943172": "https://www.drupal.org/files/issues/2018-04-15/2943172-kernel-test-base-2.patch",
"https://www.drupal.org/project/drupal/issues/2599228": "https://www.drupal.org/files/issues/2599228-31-tests-only.patch"
"https://www.drupal.org/project/drupal/issues/2943172": "https://www.drupal.org/files/issues/2018-07-05/2943172-kernel-test-base-3.patch",
"https://www.drupal.org/project/drupal/issues/2599228": "https://www.drupal.org/files/issues/2018-05-17/2599228-51.patch"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing patches which can cause errors in other components that depend on oe_multilingual. In case composer-patches encounters two different versions of the same patch it will throw an error. This will happen for example in oe_theme which depends on oe_multilingual.

I think it is best to wait with this until we were able to remove all the patches.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are going to deal with the patches in a follow up I'm approving this PR.

}
},
"installer-paths": {
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2'
services:

web:
image: fpfis/php71-dev
image: fpfis/httpd-php-dev:7.1
working_dir: /var/www/html
ports:
- 8080:8080
Expand All @@ -11,8 +11,8 @@ services:
environment:
XDEBUG_CONFIG: "remote_enable=1 remote_host=${DOCKER_HOST_IP} remote_port=9000 idekey=PHPSTORM remote_autostart=1"
PHP_IDE_CONFIG: "serverName=Test"
COMPOSER_MEMORY_LIMIT: "2G"
COMPOSER_CACHE_DIR: "/tmp/composer"

mysql:
image: fpfis/mysql56
image: percona/percona-server:5.6
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"