From 01d684416885e8b3ffd257eee12b5b0f2a87206f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julie=20P=C3=A9ron?= Date: Wed, 10 Apr 2019 18:38:38 +0200 Subject: [PATCH 1/4] update make file and update docker compose --- Makefile | 8 ++++++++ composer.json | 1 + docker/docker-compose.yml | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/Makefile b/Makefile index 33ad3c0e6..a55b80d25 100644 --- a/Makefile +++ b/Makefile @@ -150,3 +150,11 @@ phpcs: ## Fix codebase according to Drupal standards https://www.drupal.org/docs/develop/standards phpcbf: @$(call phpcsexec, phpcbf) + +check: + @echo "Config schema validation..." + $(call php, composer install --prefer-dist -o) + @$(call php, drush -y en config_inspector) + @$(eval SCHEMA_ERRORS = $(shell docker-compose exec -T --user $(CUID):$(CGID) php drush inspect_config --only-error)) + @if [ ! -z "$(SCHEMA_ERRORS)" ]; then echo "Error(s) in config schemas"; exit 1; fi + diff --git a/composer.json b/composer.json index 7cb9b737d..a08f33df6 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,7 @@ "drupal-composer/drupal-scaffold": "^2.5", "drupal/admin_toolbar": "^1", "drupal/components": "^1", + "drupal/config_inspector": "^1.0@beta", "drupal/config_installer": "^1", "drupal/core": "^8.6.7", "drupal/default_content": "^1", diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index d2d00c615..dbe33136d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -23,6 +23,49 @@ services: networks: - front +# mysql: +# image: percona:5.7.22 +# container_name: "${COMPOSE_PROJECT_NAME}_mysql" +# environment: +# MYSQL_DATABASE: d8 +# MYSQL_USER: d8 +# MYSQL_PASSWORD: d8 +# MYSQL_ROOT_PASSWORD: d8root +# restart: always +# networks: +# - front + +# redis: +# image: redis:5-alpine +# container_name: "${COMPOSE_PROJECT_NAME}_redis" +# command: redis-server --requirepass ${REDIS_PASSWD} +# restart: always +# networks: +# - front + +# varnish: +# image: skilldlabs/varnish:5.1 +# container_name: "${COMPOSE_PROJECT_NAME}_varnish" +# depends_on: +# - nginx +# restart: always +# networks: +# - front + +# solr: +# image: solr:6-alpine +# container_name: "${COMPOSE_PROJECT_NAME}_solr" +# restart: always +# volumes: +# - ./solr-conf/6.x:/solr-conf/conf +# entrypoint: +# - docker-entrypoint.sh +# - solr-precreate +# - apave +# - /solr-conf +# networks: +# - front + networks: front: driver: bridge From 09c99f473ff2f192d23c916e18b9b40c4cad6152 Mon Sep 17 00:00:00 2001 From: jbguerraz Date: Wed, 10 Apr 2019 18:59:00 +0200 Subject: [PATCH 2/4] Update docker-compose.yml --- docker/docker-compose.yml | 43 --------------------------------------- 1 file changed, 43 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index dbe33136d..d2d00c615 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -23,49 +23,6 @@ services: networks: - front -# mysql: -# image: percona:5.7.22 -# container_name: "${COMPOSE_PROJECT_NAME}_mysql" -# environment: -# MYSQL_DATABASE: d8 -# MYSQL_USER: d8 -# MYSQL_PASSWORD: d8 -# MYSQL_ROOT_PASSWORD: d8root -# restart: always -# networks: -# - front - -# redis: -# image: redis:5-alpine -# container_name: "${COMPOSE_PROJECT_NAME}_redis" -# command: redis-server --requirepass ${REDIS_PASSWD} -# restart: always -# networks: -# - front - -# varnish: -# image: skilldlabs/varnish:5.1 -# container_name: "${COMPOSE_PROJECT_NAME}_varnish" -# depends_on: -# - nginx -# restart: always -# networks: -# - front - -# solr: -# image: solr:6-alpine -# container_name: "${COMPOSE_PROJECT_NAME}_solr" -# restart: always -# volumes: -# - ./solr-conf/6.x:/solr-conf/conf -# entrypoint: -# - docker-entrypoint.sh -# - solr-precreate -# - apave -# - /solr-conf -# networks: -# - front - networks: front: driver: bridge From aa988adc4aec922365908fbfa4e412fec981adfe Mon Sep 17 00:00:00 2001 From: jbguerraz Date: Wed, 10 Apr 2019 19:14:55 +0200 Subject: [PATCH 3/4] Update Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a55b80d25..d8b71da19 100644 --- a/Makefile +++ b/Makefile @@ -151,10 +151,10 @@ phpcs: phpcbf: @$(call phpcsexec, phpcbf) -check: +cinsp: @echo "Config schema validation..." - $(call php, composer install --prefer-dist -o) @$(call php, drush -y en config_inspector) @$(eval SCHEMA_ERRORS = $(shell docker-compose exec -T --user $(CUID):$(CGID) php drush inspect_config --only-error)) + @$(call php, drush -y pmu config_inspector) @if [ ! -z "$(SCHEMA_ERRORS)" ]; then echo "Error(s) in config schemas"; exit 1; fi From 9c35e09f7f417729592a264be06d0bec79060e53 Mon Sep 17 00:00:00 2001 From: jbguerraz Date: Wed, 10 Apr 2019 19:16:21 +0200 Subject: [PATCH 4/4] Update Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d8b71da19..34ebd23c1 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Add utility functions and scripts to the container include scripts/makefile/*.mk -.PHONY: all provision si exec exec0 down clean dev info phpcs phpcbf drush check +.PHONY: all provision si exec exec0 down clean dev info phpcs phpcbf drush cinsp .DEFAULT_GOAL := help # https://stackoverflow.com/a/6273809/1826109 @@ -158,3 +158,4 @@ cinsp: @$(call php, drush -y pmu config_inspector) @if [ ! -z "$(SCHEMA_ERRORS)" ]; then echo "Error(s) in config schemas"; exit 1; fi +insp: | cinsp phpcs